Made map data xml tag more specific (output width and height as values). Add load level functionality, changes world size.
This commit is contained in:
+4
-1
@@ -27,17 +27,19 @@ class Crawler : public olc::PixelGameEngine
|
||||
float lastWorldShakeAdjust=0;
|
||||
vf2d worldShakeVel={};
|
||||
const float WORLD_SHAKE_ADJUST_MAX_TIME=0.4;
|
||||
MapName currentLevel=MapName::CAMPAIGN_1_1;
|
||||
vi2d WORLD_SIZE={120,8};
|
||||
|
||||
public:
|
||||
Crawler();
|
||||
|
||||
public:
|
||||
const vi2d WORLD_SIZE={120,8};
|
||||
TileTransformedView view;
|
||||
bool OnUserCreate() override;
|
||||
bool OnUserUpdate(float fElapsedTime) override;
|
||||
void InitializeAnimations();
|
||||
void InitializeLevel(std::string mapFile,MapName map);
|
||||
void LoadLevel(MapName map);
|
||||
void HandleUserInput(float fElapsedTime);
|
||||
void UpdateCamera(float fElapsedTime);
|
||||
void UpdateEffects(float fElapsedTime);
|
||||
@@ -59,4 +61,5 @@ public:
|
||||
bool DownReleased();
|
||||
Player&GetPlayer();
|
||||
void SetupWorldShake(float duration);
|
||||
vi2d GetWorldSize();
|
||||
};
|
||||
Reference in New Issue
Block a user