38 virtual void Tick(std::chrono::milliseconds a_Dt,
cChunk & a_Chunk)
override;
std::chrono::duration< int, std::ratio_multiply< std::chrono::milliseconds::period, std::ratio< 50 >>> cTickTime
std::chrono::milliseconds m_Timer
The number of ticks that the entity has existed / timer between collect and destroy; in msec...
int GetLifetime(void) const
Returns the number of ticks that this pickup should live for.
bool IsCollected(void) const
Returns true if the pickup has already been collected.
bool CollectedBy(cPlayer &a_Dest)
bool IsPlayerCreated(void) const
Returns true if created by player (i.e.
virtual bool DoesPreventBlockPlacement(void) const override
Returns whether blocks can be placed intersecting this entities' hitbox.
std::chrono::milliseconds m_Lifetime
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
virtual void SpawnOn(cClientHandle &a_ClientHandle) override
Descendants override this function to send a command to the specified client to spawn the entity on t...
void SetAge(int a_Age)
Set the number of ticks that this entity has existed.
bool CanCombine(void) const
Returns whether this pickup is allowed to combine with other similar pickups.
void SetLifetime(int a_Lifetime)
Set the number of ticks that this pickup should live for.
cEntity(eEntityType a_EntityType, Vector3d a_Pos, double a_Width, double a_Height)
const cItem & GetItem(void) const
#define CLASS_PROTODEF(classname)
int GetAge(void) const
Returns the number of ticks that this entity has existed.
void SetCanCombine(bool a_CanCombine)
Sets whether this pickup is allowed to combine with other similar pickups.
virtual bool DoTakeDamage(TakeDamageInfo &a_TDI) override
Makes this entity take damage specified in the a_TDI.