World.h 768 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include <vector>
  3. #include "HeightMap.h"
  4. #include "Player.h"
  5. #include "Enemy.h"
  6. #include "LevelObject.h"
  7. #include "Interface.h"
  8. #include "Crystal.h"
  9. #include "Skybox.h"
  10. class Entity;
  11. class World
  12. {
  13. private:
  14. std::vector<std::pair<int, std::pair<std::string, bool>>> objecttemplates;
  15. Player* player;
  16. HeightMap* heightmap;
  17. Interface* interface;
  18. Skybox* skybox;
  19. int music_id;
  20. std::vector<Entity*> entities;
  21. std::vector<Enemy*> enemies;
  22. //std::vector<Crystal*> crystals;
  23. public:
  24. World(const std::string &fileName);
  25. ~World();
  26. void draw();
  27. void update(float elapsedTime);
  28. bool isPlayerPositionValid();
  29. float getHeight(float x, float y);
  30. void addLevelObject(LevelObject* obj);
  31. std::pair<std::string, bool> getObjectFromValue(int i);
  32. };