-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCharacter.cpp
More file actions
53 lines (35 loc) · 896 Bytes
/
Character.cpp
File metadata and controls
53 lines (35 loc) · 896 Bytes
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
45
46
47
48
49
50
51
52
53
#include "Character.h"
#include <SFML/Graphics.hpp>
#include "DynamicSprite.h"
#include "Actor.h"
using namespace std;
Character::Character()
{
}
Character::Character(sf::Vector2f location, sf::Vector2f desiredSize, sf::Texture *texture, int nbrColumns, int nbrRow, int nbrFrames, int framerate)
{
setVisibility(true);
m_simulatePhysics=true;
m_location = location;
m_characterSprite = DynamicSprite(location, desiredSize, texture, nbrColumns, nbrRow, nbrFrames, framerate);
}
Character::~Character()
{
}
void Character::updateComponent()
{
m_characterSprite.updateComponent();
}
void Character::setPlayForward(bool playForward)
{
m_characterSprite.setPlayForward(playForward);
}
std::vector<sf::Sprite*> Character::getDraw()
{
std::vector<sf::Sprite*> toReturn;
toReturn.push_back(m_characterSprite.getSprite());
return toReturn;
}
void Character::jump()
{
}