Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. class World{
  2. public:
  3.  
  4. list<Map> maps; //The list of all game maps
  5. Map* currentmap; //The active map
  6. int totalmaps; //The total number of maps
  7.  
  8. Player player; //The player
  9. bool gameover(){return player.hp <= 0;} //Is the game over? Check the player's HP to find out
  10.  
  11. //The list of active events/timers
  12. list<Event> eventqueue;
  13.  
  14.  
  15. //SERIALIZATION
  16.  
  17. /*GAME EXECUTION*/
  18. //Start a new game
  19. void NewGame();
  20. //Run the game
  21. void RunGame();
  22.  
  23.  
  24. /*MAPS*/
  25. //Creates a new map
  26. Map* NewMap(branches_t branch, int floornumber, Feature* connector = NULL);
  27. //Moves execution to the given map
  28. void ChangeMap(Map* destination);
  29.  
  30. /*GAME DATA*/
  31. //Master vector of GameObject pointers - easy access through uid
  32. //Objects are added to this vector when stamped
  33. vector<GameObject*> worldobjects;
  34.  
  35. /*ITEMS*/
  36. //Master item list, all game items go here
  37. list<Item> worlditems;
  38.  
  39. /*CREATURES*/
  40. //Master creature list, all game creatures go here
  41. list<Creature> worldcreatures;
  42.  
  43.  
  44. //DO SOMETHING WITH THIS - IT DOESN'T FEEL RIGHT
  45. /*SWARMS*/
  46. //Master list of swarms
  47. list<Mind> worldswarms;
  48.  
  49.  
  50. /*EVENTS*/
  51. //Creates a new timer/event and adds it to the queue
  52. void AddTimer(events_t type, int timer, GameObject* gameobject);
  53. //Decreases all timers until the next event hits 0, then return the event
  54. Event& NextEvent();
  55.  
  56. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement