Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
engine.h
1 #pragma once
2 
3 #include <memory>
4 #include <string>
5 
6 #include <glm/glm.hpp>
7 
8 #include "enginepower.h"
9 #include "enginestate.h"
10 #include "equipment.h"
11 
12 
13 class EngineSlot;
15 class Visuals;
16 class SoundProperties;
17 class Sound;
18 
19 class Engine: public Equipment {
20 public:
21  Engine(const std::string& equipmentKey);
22  virtual ~Engine();
23 
24  virtual const Visuals& visuals() const = 0;
25  virtual const SoundProperties& sound() const = 0;
26 
27  EngineSlot* engineSlot();
28  const EngineSlot* engineSlot() const;
29  void setEngineSlot(EngineSlot* engineSlot);
30 
31  virtual EnginePower power() const = 0;
32 
33  const EngineState& state() const;
34  void setState(const EngineState& state);
35 
36  Acceleration currentAcceleration() const;
37 
38  virtual void update(float deltaSec);
39 
40 
41 protected:
42  std::unique_ptr<EngineTrailGenerator> m_trailGenerator;
43  std::shared_ptr<Sound> m_sound;
44  EngineSlot* m_engineSlot;
45  EngineState m_state;
46 
47 
48  void setupTrail();
49 };
50 
Definition: enginetrailgenerator.h:13
Definition: enginepower.h:22
Definition: sound.h:12
Definition: equipment.h:6
Definition: engineslot.h:17
Definition: visuals.h:11
Definition: abstractmove.h:5
Definition: engine.h:19
Definition: soundproperties.h:5