Renamed actionEvent

This commit is contained in:
Linda Andersson 2014-02-26 09:11:45 +01:00
commit 8438b7dfbb
3 changed files with 6 additions and 6 deletions

View File

@ -182,7 +182,7 @@ void Game::SetDeadSubscription(GameEvent::ObjectDeadFunction functionPointer)
} }
void Game::SetActionSubscription(GameEvent::AnimationEventFunction functionPointer) void Game::SetActionSubscription(GameEvent::AnimationEventFunction functionPointer)
{ {
this->onPlayerActionEventFnc = functionPointer; this->onActionEventFnc = functionPointer;
} }
void Game::SetPickupSubscription(GameEvent::PickupEventFunction functionPointer) void Game::SetPickupSubscription(GameEvent::PickupEventFunction functionPointer)
{ {

View File

@ -106,7 +106,7 @@ namespace GameLogic
GameEvent::ObjectHpFunction onDamageTakenFnc; GameEvent::ObjectHpFunction onDamageTakenFnc;
GameEvent::ObjectRespawnedFunction onRespawnFnc; GameEvent::ObjectRespawnedFunction onRespawnFnc;
GameEvent::ObjectDeadFunction onDeadFnc; GameEvent::ObjectDeadFunction onDeadFnc;
GameEvent::AnimationEventFunction onPlayerActionEventFnc; GameEvent::AnimationEventFunction onActionEventFnc;
GameEvent::PickupEventFunction onPickupEventFnc; GameEvent::PickupEventFunction onPickupEventFnc;
}; };
} }

View File

@ -142,7 +142,7 @@ void Player::BeginFrame()
if(this->playerState != PLAYER_STATE::PLAYER_STATE_JUMPING) if(this->playerState != PLAYER_STATE::PLAYER_STATE_JUMPING)
{ {
if(this->playerState != PLAYER_STATE::PLAYER_STATE_IDLE) if(this->playerState != PLAYER_STATE::PLAYER_STATE_IDLE)
this->gameInstance->onPlayerActionEventFnc( this, PlayerAction::PlayerAction_Idle); this->gameInstance->onActionEventFnc( this, PlayerAction::PlayerAction_Idle);
this->playerState = PLAYER_STATE::PLAYER_STATE_IDLE; this->playerState = PLAYER_STATE::PLAYER_STATE_IDLE;
} }
} }
@ -178,7 +178,7 @@ void Player::BeginFrame()
if(this->playerState != PLAYER_STATE::PLAYER_STATE_JUMPING) if(this->playerState != PLAYER_STATE::PLAYER_STATE_JUMPING)
{ {
if(this->playerState != PLAYER_STATE::PLAYER_STATE_WALKING) if(this->playerState != PLAYER_STATE::PLAYER_STATE_WALKING)
this->gameInstance->onPlayerActionEventFnc( this, PlayerAction::PlayerAction_Walk); this->gameInstance->onActionEventFnc( this, PlayerAction::PlayerAction_Walk);
this->playerState = PLAYER_STATE::PLAYER_STATE_WALKING; this->playerState = PLAYER_STATE::PLAYER_STATE_WALKING;
} }
} }
@ -200,7 +200,7 @@ void Player::BeginFrame()
this->rigidBody->ApplyImpulse(up*this->rigidBody->GetState().mass * 20); this->rigidBody->ApplyImpulse(up*this->rigidBody->GetState().mass * 20);
if(this->playerState != PLAYER_STATE::PLAYER_STATE_JUMPING) if(this->playerState != PLAYER_STATE::PLAYER_STATE_JUMPING)
this->gameInstance->onPlayerActionEventFnc( this, PlayerAction::PlayerAction_Jump); this->gameInstance->onActionEventFnc( this, PlayerAction::PlayerAction_Jump);
this->playerState = PLAYER_STATE::PLAYER_STATE_JUMPING; this->playerState = PLAYER_STATE::PLAYER_STATE_JUMPING;
} }
} }
@ -208,7 +208,7 @@ void Player::BeginFrame()
{ {
if(this->playerState == PLAYER_STATE::PLAYER_STATE_JUMPING) if(this->playerState == PLAYER_STATE::PLAYER_STATE_JUMPING)
{ {
this->gameInstance->onPlayerActionEventFnc( this, PlayerAction::PlayerAction_Idle); this->gameInstance->onActionEventFnc( this, PlayerAction::PlayerAction_Idle);
this->playerState = PLAYER_STATE::PLAYER_STATE_IDLE; this->playerState = PLAYER_STATE::PLAYER_STATE_IDLE;
} }
} }