World.h 887 B

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