[Fix] NPC animation sequence.
This commit is contained in:
parent
3c10632e78
commit
eb120e1252
@ -8,7 +8,7 @@ Player::Player(Map *mapArg) : Character(mapArg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Player::~Player(void) {
|
Player::~Player(void) {
|
||||||
|
\
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::HandleInput(void) {
|
void Player::HandleInput(void) {
|
||||||
|
@ -14,6 +14,11 @@ NPC::~NPC(void) {
|
|||||||
|
|
||||||
void NPC::Update(void) {
|
void NPC::Update(void) {
|
||||||
Move();
|
Move();
|
||||||
|
|
||||||
|
if(xVel > 0) m_directionFacing = FACING_RIGHT;
|
||||||
|
else if(xVel < 0) m_directionFacing = FACING_LEFT;
|
||||||
|
else if(yVel > 0) m_directionFacing = FACING_DOWN;
|
||||||
|
else if(yVel < 0) m_directionFacing = FACING_UP;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NPC::Move(void) {
|
void NPC::Move(void) {
|
||||||
|
Loading…
Reference in New Issue
Block a user