Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class World{
- public:
- list<Map> maps; //The list of all game maps
- Map* currentmap; //The active map
- int totalmaps; //The total number of maps
- Player player; //The player
- bool gameover(){return player.hp <= 0;} //Is the game over? Check the player's HP to find out
- //The list of active events/timers
- list<Event> eventqueue;
- //SERIALIZATION
- /*GAME EXECUTION*/
- //Start a new game
- void NewGame();
- //Run the game
- void RunGame();
- /*MAPS*/
- //Creates a new map
- Map* NewMap(branches_t branch, int floornumber, Feature* connector = NULL);
- //Moves execution to the given map
- void ChangeMap(Map* destination);
- /*GAME DATA*/
- //Master vector of GameObject pointers - easy access through uid
- //Objects are added to this vector when stamped
- vector<GameObject*> worldobjects;
- /*ITEMS*/
- //Master item list, all game items go here
- list<Item> worlditems;
- /*CREATURES*/
- //Master creature list, all game creatures go here
- list<Creature> worldcreatures;
- //DO SOMETHING WITH THIS - IT DOESN'T FEEL RIGHT
- /*SWARMS*/
- //Master list of swarms
- list<Mind> worldswarms;
- /*EVENTS*/
- //Creates a new timer/event and adds it to the queue
- void AddTimer(events_t type, int timer, GameObject* gameobject);
- //Decreases all timers until the next event hits 0, then return the event
- Event& NextEvent();
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement