diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-10-10 19:33:33 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-10-10 19:33:33 +0200 |
commit | 753f71536339b78c49468ba6452c96d6b3c345b2 (patch) | |
tree | 0f3edbef6b2a34a738dc37cc8dd8c11a98e54c85 /src/game.cpp | |
parent | ff4929c650e6ed446b6faff9f6b0f078d0a3644c (diff) |
Finish work on world entities, start experimenting with world generation.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/game.cpp b/src/game.cpp index 6fff821..6416f93 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2,20 +2,24 @@ namespace game { +static human_t *human; + void state_t::start(void) { - human_t *human; - human = new human_t; - human->bounds.left = 0.2f; - human->bounds.top = 0.2f; - human->bounds.width = 1.0f; - human->bounds.height = 1.0f; + human->bounds.left = -0.2f; + human->bounds.top = -0.2f; + human->bounds.width = 3.0f; + human->bounds.height = 3.0f; human->link(&world); } void state_t::tick(void) { + human->unlink(); + human->bounds.left += 0.05f; + human->bounds.top += 0.05f; + human->link(&world); } } //namespace game |