1
0
Fork 0
cuberite-2a/src/Entities/TNTEntity.h

48 lines
832 B
C
Raw Normal View History

#pragma once
#include "Entity.h"
2013-12-14 15:28:17 +00:00
// tolua_begin
2020-04-13 16:38:06 +00:00
class cTNTEntity:
public cEntity
{
2016-02-05 21:45:45 +00:00
2013-12-14 15:28:17 +00:00
// tolua_end
2020-04-13 16:38:06 +00:00
using Super = cEntity;
public: // tolua_export
CLASS_PROTODEF(cTNTEntity)
cTNTEntity(Vector3d a_Pos, int a_FuseTicks = 80);
2016-02-05 21:45:45 +00:00
// cEntity overrides:
virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
2016-02-05 21:45:45 +00:00
// tolua_begin
2016-02-05 21:45:45 +00:00
/** Explode the tnt */
void Explode(void);
2016-02-05 21:45:45 +00:00
/** Returns the fuse ticks until the tnt will explode */
2014-03-08 11:24:33 +00:00
int GetFuseTicks(void) const { return m_FuseTicks; }
2016-02-05 21:45:45 +00:00
/** Set the fuse ticks until the tnt will explode */
2014-03-08 11:24:33 +00:00
void SetFuseTicks(int a_FuseTicks) { m_FuseTicks = a_FuseTicks; }
2016-02-05 21:45:45 +00:00
// tolua_end
2016-02-05 21:45:45 +00:00
protected:
2014-03-08 11:24:33 +00:00
int m_FuseTicks; ///< How much ticks is left, while the tnt will explode
}; // tolua_export