J :
* Remove ^M's. * Re-indent automatically. * Remove whitespace at the end of lines.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
MTGGamePhase::MTGGamePhase(int id):ActionElement(id){
|
||||
animation = 0;
|
||||
currentState = -1;
|
||||
mFont= GameApp::CommonRes->GetJLBFont("graphics/f3");
|
||||
mFont= GameApp::CommonRes->GetJLBFont("graphics/f3");
|
||||
mFont->SetBase(0); // using 2nd font
|
||||
|
||||
}
|
||||
@@ -17,39 +17,39 @@ void MTGGamePhase::Render(){
|
||||
|
||||
void MTGGamePhase::Update(float dt){
|
||||
|
||||
int newState = GameObserver::GetInstance()->getCurrentGamePhase();
|
||||
if (newState != currentState){
|
||||
activeState = ACTIVE;
|
||||
animation = 1;
|
||||
currentState = newState;
|
||||
int newState = GameObserver::GetInstance()->getCurrentGamePhase();
|
||||
if (newState != currentState){
|
||||
activeState = ACTIVE;
|
||||
animation = 1;
|
||||
currentState = newState;
|
||||
|
||||
switch (currentState){
|
||||
switch (currentState){
|
||||
|
||||
default: break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (animation > 0){
|
||||
|
||||
if (animation > 0){
|
||||
fprintf(stderr, "animation = %f", animation);
|
||||
animation -= dt *5 ;
|
||||
}else{
|
||||
activeState = INACTIVE;
|
||||
activeState = INACTIVE;
|
||||
animation = 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MTGGamePhase::CheckUserInput(float dt){
|
||||
GameObserver * game = GameObserver::GetInstance();
|
||||
if (activeState == INACTIVE){
|
||||
if (mEngine->GetButtonClick(PSP_CTRL_RTRIGGER) && game->currentActionPlayer == game->currentlyActing())
|
||||
{
|
||||
activeState = ACTIVE;
|
||||
game->userRequestNextGamePhase();
|
||||
}
|
||||
}
|
||||
GameObserver * game = GameObserver::GetInstance();
|
||||
if (activeState == INACTIVE){
|
||||
if (mEngine->GetButtonClick(PSP_CTRL_RTRIGGER) && game->currentActionPlayer == game->currentlyActing())
|
||||
{
|
||||
activeState = ACTIVE;
|
||||
game->userRequestNextGamePhase();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user