Level loading modularized. Levels auto-load/cache tilesets that are already loaded and shared between maps.
This commit is contained in:
@@ -21,6 +21,7 @@ class Crawler : public olc::PixelGameEngine
|
||||
GFX_Battlecry_Effect,GFX_Mana,GFX_SonicSlash;
|
||||
std::vector<Effect>foregroundEffects,backgroundEffects;
|
||||
std::map<MapName,Map>MAP_DATA;
|
||||
std::map<std::string,Renderable*>MAP_TILESETS;
|
||||
vf2d worldShake={};
|
||||
float worldShakeTime=0;
|
||||
float lastWorldShakeAdjust=0;
|
||||
@@ -36,6 +37,7 @@ public:
|
||||
bool OnUserCreate() override;
|
||||
bool OnUserUpdate(float fElapsedTime) override;
|
||||
void InitializeAnimations();
|
||||
void InitializeLevel(std::string mapFile,MapName map);
|
||||
void HandleUserInput(float fElapsedTime);
|
||||
void UpdateCamera(float fElapsedTime);
|
||||
void UpdateEffects(float fElapsedTime);
|
||||
|
||||
Reference in New Issue
Block a user