-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcreature.cpp
44 lines (37 loc) · 830 Bytes
/
creature.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// creature.cpp
//
//
// Created by Munger Rufus on 2015-05-09.
//
//
#include "creature.h"
creature::creature() // Default Constructor
{
// Rect
rect.setPosition(100, 100);
rect.setOrigin(50,50);
rect.setSize(sf::Vector2f(100, 100));
rect.setFillColor(sf::Color::Green);
// Sprite
sprite.setOrigin(100,100);
sprite.setPosition(100, 100);
}
void creature::displayStats()
{
std::cout << "level: " << level << std::endl;
std::cout << "hp: " << hp << std::endl;
std::cout << "str: " << str << std::endl;
std::cout << "vit: " << vit << std::endl;
std::cout << "dex: " << dex << std::endl;
}
void creature::attack()
{
}
void creature::setStats(int hp,int str,int vit,int dex)
{
this->hp = hp;
this->str = str;
this->vit = vit;
this->dex = dex;
}