Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
ship.h
1 #pragma once
2 
3 #include <list>
4 #include <memory>
5 
6 #include "worldobject.h"
7 #include "property/property.h"
8 
9 
10 class World;
11 class God;
12 class Hardpoint;
13 class Engine;
14 class Character;
15 class Sound;
16 class SquadLogic;
17 class BoardComputer;
18 
23 class Ship: public WorldObject {
24 public:
25  Ship();
26  virtual ~Ship();
27 
28  virtual WorldObjectType objectType() const override;
29 
30  virtual void update(float deltaSec) override;
31 
32  Handle<Ship>& handle();
33 
34  void setTargetObject(WorldObject* target);
35  WorldObject* targetObject();
36 
37  BoardComputer* boardComputer();
38  SquadLogic* squadLogic();
39 
40  void setCharacter(Character* character);
41  Character* character();
42 
43 
44 protected:
45  std::unique_ptr<Character> m_character;
46  std::unique_ptr<BoardComputer> m_boardComputer;
47 
48  std::unique_ptr<SquadLogic> m_squadLogic;
49 
50  Handle<Ship> m_shipHandle;
51  Handle<WorldObject> m_targetObjectHandle;
52 
53 
54  void updateEnginePosition();
55 };
56 
Definition: worldobject.h:43
Definition: sound.h:12
Definition: world.h:20
Definition: god.h:19
Definition: hardpoint.h:18
Definition: boardcomputer.h:19
Definition: character.h:15
Definition: squadlogic.h:14
Definition: engine.h:19
Definition: ship.h:23