World.h 828 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #include "Portal.h"
  11. class Entity;
  12. class World
  13. {
  14. private:
  15. std::vector<std::pair<int, std::pair<std::string, bool>>> objecttemplates;
  16. Player* player;
  17. HeightMap* heightmap;
  18. Interface* interface;
  19. Skybox* skybox;
  20. Portal* portal;
  21. int music_id,maxCrystals,maxEnemies;
  22. std::vector<Entity*> entities;
  23. std::vector<Enemy*> enemies;
  24. //std::vector<Crystal*> crystals;
  25. public:
  26. World(const std::string &fileName);
  27. ~World();
  28. void draw();
  29. void update(float elapsedTime);
  30. bool isPlayerPositionValid();
  31. float getHeight(float x, float y);
  32. void addLevelObject(LevelObject* obj);
  33. std::pair<std::string, bool> getObjectFromValue(int i);
  34. };