6 #include "scripting/scriptable.h"
8 #include "utils/handle/handle.h"
10 #include "voxel/voxelcluster.h"
23 enum class SpawnState {
31 enum class WorldObjectType {
49 virtual WorldObjectType objectType()
const;
51 SpawnState spawnState()
const;
52 void setSpawnState(SpawnState spawnState);
67 virtual void update(
float deltaSec);
69 virtual void addVoxel(
Voxel* voxel)
override;
70 virtual void removeVoxel(
Voxel* voxel)
override;
72 Voxel* crucialVoxel();
73 void setCrucialVoxel(
const glm::ivec3& cell);
74 bool isCrucialVoxelDestroyed();
76 void updateTransformAndGeode(
const glm::vec3& position,
const glm::quat& orientation);
78 virtual void onCollision();
79 virtual void onSpawnFail();
84 float collisionFieldOfDamage()
const;
85 void setCollisionFieldOfDamage(
float collisionFieldOfDamage);
87 virtual bool passiveForCollisionDetection();
91 std::unique_ptr<CollisionFilter> m_collisionFilter;
92 std::unique_ptr<CollisionDetector> m_collisionDetector;
93 std::unique_ptr<Physics> m_physics;
94 std::unique_ptr<ObjectInfo> m_objectInfo;
95 std::unique_ptr<WorldObjectComponents> m_components;
98 Voxel* m_crucialVoxel;
99 bool m_crucialVoxelDestroyed;
100 float m_collisionFieldOfDamage;
101 SpawnState m_spawnState;
Definition: collisionfilter.h:9
Definition: worldobject.h:43
Definition: voxelcluster.h:21
Definition: collisiondetector.h:19
Definition: fuelvoxel.h:6
Definition: objectinfo.h:8
Definition: voxelcollision.h:22
Definition: worldobjectcomponents.h:22
Definition: hardpointvoxel.h:10
Definition: cockpitvoxel.h:6
Definition: scriptable.h:4