2013-07-29 11:13:03 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Entity.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-14 15:28:17 +00:00
|
|
|
// tolua_begin
|
2013-07-29 11:13:03 +00:00
|
|
|
class cTNTEntity :
|
|
|
|
public cEntity
|
|
|
|
{
|
|
|
|
typedef cEntity super;
|
2016-02-05 21:45:45 +00:00
|
|
|
|
2013-07-29 11:13:03 +00:00
|
|
|
public:
|
2013-12-14 15:28:17 +00:00
|
|
|
// tolua_end
|
2014-07-22 22:36:13 +00:00
|
|
|
CLASS_PROTODEF(cTNTEntity)
|
2013-07-29 11:13:03 +00:00
|
|
|
|
2017-09-07 08:25:34 +00:00
|
|
|
cTNTEntity(Vector3d a_Pos, int a_FuseTicks = 80);
|
2016-02-05 21:45:45 +00:00
|
|
|
|
2013-07-29 11:13:03 +00:00
|
|
|
// cEntity overrides:
|
|
|
|
virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
|
2015-01-11 21:12:26 +00:00
|
|
|
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
|
2016-02-05 21:45:45 +00:00
|
|
|
|
2014-03-08 09:25:46 +00:00
|
|
|
// tolua_begin
|
2016-02-05 21:45:45 +00:00
|
|
|
|
2014-03-08 09:25:46 +00:00
|
|
|
/** Explode the tnt */
|
|
|
|
void Explode(void);
|
2016-02-05 21:45:45 +00:00
|
|
|
|
2014-03-08 09:25:46 +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
|
|
|
|
2014-03-08 09:25:46 +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
|
|
|
|
2014-03-08 09:25:46 +00:00
|
|
|
// tolua_end
|
2016-02-05 21:45:45 +00:00
|
|
|
|
2013-07-29 11:13:03 +00:00
|
|
|
protected:
|
2014-03-08 11:24:33 +00:00
|
|
|
int m_FuseTicks; ///< How much ticks is left, while the tnt will explode
|
2014-07-17 20:15:34 +00:00
|
|
|
}; // tolua_export
|
2013-07-29 11:13:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|