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:
+2
-11
@@ -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);
|
||||
};
|
||||
Reference in New Issue
Block a user