]> git.localhorst.tv Git - blobs.git/blob - src/creature/Situation.hpp
df7abf2b9f0dab475d8904a1a9037898f33d003d
[blobs.git] / src / creature / Situation.hpp
1 #ifndef BLOBS_CREATURE_SITUATION_HPP_
2 #define BLOBS_CREATURE_SITUATION_HPP_
3
4 #include "../math/glm.hpp"
5
6
7 namespace blobs {
8 namespace world {
9         class Planet;
10         class Tile;
11         class TileType;
12 }
13 namespace creature {
14
15 class Situation {
16
17 public:
18         Situation();
19         ~Situation();
20
21         Situation(const Situation &) = delete;
22         Situation &operator =(const Situation &) = delete;
23
24         Situation(Situation &&) = delete;
25         Situation &operator =(Situation &&) = delete;
26
27 public:
28         bool OnPlanet() const noexcept;
29         world::Planet &GetPlanet() const noexcept { return *planet; }
30         bool OnSurface() const noexcept;
31         int Surface() const noexcept { return surface; }
32         const glm::dvec3 &Position() const noexcept { return position; }
33         world::Tile &GetTile() const noexcept;
34         const world::TileType &GetTileType() const noexcept;
35
36         void Move(const glm::dvec3 &dp) noexcept;
37         void SetPlanetSurface(world::Planet &, int srf, const glm::dvec3 &pos) noexcept;
38
39 public:
40         world::Planet *planet;
41         glm::dvec3 position;
42         int surface;
43         enum {
44                 LOST,
45                 PLANET_SURFACE,
46         } type;
47
48 };
49
50 }
51 }
52
53 #endif