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

44 lines
848 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, unsigned 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 */
unsigned GetFuseTicks(void) const { return m_FuseTicks; }
2016-02-05 21:45:45 +00:00
/** Set the fuse ticks until the tnt will explode */
void SetFuseTicks(unsigned 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:
unsigned m_FuseTicks; ///< How much ticks is left, while the tnt will explode
}; // tolua_export