summaryrefslogtreecommitdiffstats
path: root/source/Entities/TNTEntity.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-19 11:39:13 +0200
committermadmaxoft <github@xoft.cz>2013-08-19 11:39:13 +0200
commit1a7912744ff2e0abfeae0d2d75af80d73209580c (patch)
treee5372cdfece1852c00ed7b0219ad77ee82ea1858 /source/Entities/TNTEntity.h
parentFixed timed event wait on Linux. (diff)
downloadcuberite-1a7912744ff2e0abfeae0d2d75af80d73209580c.tar
cuberite-1a7912744ff2e0abfeae0d2d75af80d73209580c.tar.gz
cuberite-1a7912744ff2e0abfeae0d2d75af80d73209580c.tar.bz2
cuberite-1a7912744ff2e0abfeae0d2d75af80d73209580c.tar.lz
cuberite-1a7912744ff2e0abfeae0d2d75af80d73209580c.tar.xz
cuberite-1a7912744ff2e0abfeae0d2d75af80d73209580c.tar.zst
cuberite-1a7912744ff2e0abfeae0d2d75af80d73209580c.zip
Diffstat (limited to 'source/Entities/TNTEntity.h')
-rw-r--r--source/Entities/TNTEntity.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/source/Entities/TNTEntity.h b/source/Entities/TNTEntity.h
new file mode 100644
index 000000000..ae6fc75e2
--- /dev/null
+++ b/source/Entities/TNTEntity.h
@@ -0,0 +1,33 @@
+
+#pragma once
+
+#include "Entity.h"
+
+
+
+
+
+class cTNTEntity :
+ public cEntity
+{
+ typedef cEntity super;
+
+public:
+ CLASS_PROTODEF(cTNTEntity);
+
+ cTNTEntity(double a_X, double a_Y, double a_Z, double a_FuseTimeInSec);
+ cTNTEntity(const Vector3d & a_Pos, double a_FuseTimeInSec);
+
+ // cEntity overrides:
+ virtual bool Initialize(cWorld * a_World) override;
+ virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
+ virtual void Tick(float a_Dt, cChunk & a_Chunk) override;
+
+protected:
+ double m_Counter; ///< How much time has elapsed since the object was created, in seconds
+ double m_MaxFuseTime; ///< How long the fuse is, in seconds
+};
+
+
+
+