WorldHandler.h 566 B

123456789101112131415161718192021222324252627282930313233343536
  1. #pragma once
  2. #include <string>
  3. #include <vector>
  4. class World;
  5. class WorldHandler
  6. {
  7. private:
  8. WorldHandler();
  9. static WorldHandler* instance;
  10. bool loadingWorld;
  11. World* world;
  12. int worldIndex;
  13. void ChangeWorld(int i);
  14. public:
  15. ~WorldHandler();
  16. static WorldHandler* getInstance(void);
  17. static void init();
  18. void draw(void);
  19. void update(float deltaTime);
  20. bool isPlayerPositionValid(void);
  21. float getHeight(float x, float y);
  22. void Navigate(const std::string &fileName);
  23. void NextWorld();
  24. void PreviousWorld();
  25. std::vector<std::string> worldfiles;
  26. };