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:
2023-06-22 02:46:38 -07:00
parent 2ec484206d
commit d6e9ade54e
6 changed files with 39 additions and 15 deletions
+4 -1
View File
@@ -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();
};