Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
worldobjectbuilder.h
1 #pragma once
2 
3 #include <string>
4 
5 
6 class Bullet;
7 class Rocket;
8 class Ship;
9 class VoxelCluster;
10 class WorldObject;
12 
17 public:
18  WorldObjectBuilder(const std::string& name);
19 
20  WorldObject* build();
21 
22  Bullet* buildBullet();
23  Rocket* buildRocket();
24  Ship* buildShip();
25  WorldObject* buildWorldObject();
26 
27 
28 
29 protected:
30  std::string m_name;
31 
32  template<typename WorldObjectType>
33  WorldObjectType* makeWorldObject();
34 
35  void setupVoxelCluster(WorldObject* worldObject);
36  void setupComponents(WorldObjectComponents& components);
37  void setupHardpoints(WorldObjectComponents& components);
38  void setupEngineSlots(WorldObjectComponents& components);
39 
40 
41  /*
42  Little hack method that ensures all hardpoints and engine-points are equipped
43  with something
44  */
45  void equipSomehow(WorldObject* worldObject);
46 };
47 
Definition: worldobject.h:43
Definition: voxelcluster.h:21
Definition: rocket.h:22
Definition: worldobjectbuilder.h:16
Definition: worldobjectcomponents.h:22
Definition: bullet.h:12
Definition: ship.h:23