Added gameover and reset game

feature/victory_gameover
Jers 10 months ago
parent f6f3f7155a
commit cc12c074b0

BIN
Content/Blueprints/BP_GameState.uasset (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -50,13 +50,34 @@ bool UStateMachineSubsystem::ChangeState(const EGameState NewState)
switch(NewState) switch(NewState)
{ {
case EGameState::Battle: case EGameState::Battle:
UE_LOG(LogTemp, Error, TEXT("Entering BATTLE state from BATTLEMENU")) UE_LOG(LogTemp, Display, TEXT("Entering BATTLE state from BATTLEMENU"))
break; break;
default: default:
UE_LOG(LogTemp, Error, TEXT("NewState is invalid from BATTLEMENU state: %hhd"), NewState) UE_LOG(LogTemp, Error, TEXT("NewState is invalid from BATTLEMENU state: %hhd"), NewState)
return false; return false;
} }
break; break;
case EGameState::GameOver:
switch(NewState)
{
case EGameState::MainMenu:
UE_LOG(LogTemp, Display, TEXT("Entering MAINMENU state from GAMEOVER"))
break;
default:
UE_LOG(LogTemp, Error, TEXT("NewState is invalid from GAMEOVER: %hhd"), NewState)
return false;
}
break;
case EGameState::Victory:
switch(NewState)
{
case EGameState::MainMenu:
UE_LOG(LogTemp, Display, TEXT("Entering MAINMENU state from VICTORY"))
break;
default:
UE_LOG(LogTemp, Error, TEXT("NewState is invalid from VICTORY: %hhd"), NewState)
return false;
}
default: default:
UE_LOG(LogTemp, Error, TEXT("Leaving unknown state, this is a problem")) UE_LOG(LogTemp, Error, TEXT("Leaving unknown state, this is a problem"))
return false; return false;

Loading…
Cancel
Save