Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef STARTPOINT_H
- #define STARTPOINT_H
- #include "Empty.h"
- #include "json/writer.h"
- using namespace std;
- class StartPoint : public Empty {
- public:
- virtual void applyTo(json::Object& starSystem, json::Array& gameObjects) {
- // Since the player is within this starsystem, it makes sense to make it
- // visible too. This is just a default state when the player starts a game.
- starSystem["visible"] = json::Boolean(true);
- // Very trivially add the player.
- gameObjects.Insert(createGameObjectJson("starship", 100, 100, -100));
- }
- };
- #endif // STARTPOINT_H
Advertisement
Add Comment
Please, Sign In to add comment