[Fix] NPC animation sequence.

This commit is contained in:
Rtch90 2011-12-17 17:05:01 +00:00
parent 3c10632e78
commit eb120e1252
2 changed files with 6 additions and 1 deletions

View File

@ -8,7 +8,7 @@ Player::Player(Map *mapArg) : Character(mapArg) {
} }
Player::~Player(void) { Player::~Player(void) {
\
} }
void Player::HandleInput(void) { void Player::HandleInput(void) {

View File

@ -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) {