Map names now stored based on stage plate names provided. Made unlock conditions based on their actual unlock conditions and not the names of the plates.

This commit is contained in:
2023-11-16 19:24:02 -06:00
parent 008f6a28f6
commit ce3be8b05d
11 changed files with 45 additions and 41 deletions
+2 -11
View File
@@ -32,10 +32,9 @@ SUCH DAMAGE.
#pragma once
#include <map>
#include <iostream>
#include "Crawler.h"
#include "Error.h"
INCLUDE_game
class Crawler;
namespace States{
enum State{
@@ -54,13 +53,5 @@ public:
virtual void OnStateChange(GameState*prevState)=0;
virtual void OnUserUpdate(Crawler*game)=0;
virtual void Draw(Crawler*game)=0;
static inline void ChangeState(States::State newState){
GameState*prevState=STATE;
if(!states.count(newState)){
ERR("WARNING! State not defined for state "<<newState<<"!")
}
STATE=states.at(newState);
game->camera.SetTarget(game->GetPlayer()->GetPos());
STATE->OnStateChange(prevState);
}
static void ChangeState(States::State newState);
};