Added intro video
This commit is contained in:
@ -156,9 +156,19 @@ void StateManager::render(RenderManager& renderer) {
|
||||
}
|
||||
|
||||
bool StateManager::isValidState(AppState state) const {
|
||||
// All enum values are currently valid
|
||||
return static_cast<int>(state) >= static_cast<int>(AppState::Loading) &&
|
||||
static_cast<int>(state) <= static_cast<int>(AppState::GameOver);
|
||||
switch (state) {
|
||||
case AppState::Loading:
|
||||
case AppState::Video:
|
||||
case AppState::Menu:
|
||||
case AppState::Options:
|
||||
case AppState::LevelSelector:
|
||||
case AppState::Playing:
|
||||
case AppState::LevelSelect:
|
||||
case AppState::GameOver:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool StateManager::canTransitionTo(AppState newState) const {
|
||||
@ -169,6 +179,7 @@ bool StateManager::canTransitionTo(AppState newState) const {
|
||||
const char* StateManager::getStateName(AppState state) const {
|
||||
switch (state) {
|
||||
case AppState::Loading: return "Loading";
|
||||
case AppState::Video: return "Video";
|
||||
case AppState::Menu: return "Menu";
|
||||
case AppState::Options: return "Options";
|
||||
case AppState::LevelSelector: return "LevelSelector";
|
||||
|
||||
Reference in New Issue
Block a user