Cuberite
A lightweight, fast and extensible game server for Minecraft
Skeleton.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "AggressiveMonster.h"
5 
6 
7 
8 
9 
10 class cSkeleton:
11  public cAggressiveMonster
12 {
14 
15 public:
16 
17  cSkeleton();
18 
20 
21  virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
22 
23  virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = nullptr) override;
24  virtual bool Attack(std::chrono::milliseconds a_Dt) override;
25  virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
26 
27  virtual bool IsUndead(void) override { return true; }
28 
29  bool IsChargingBow() const { return m_ChargingBow; }
30 
31 private:
32 
34 
35 } ;
cClientHandle
Definition: ClientHandle.h:49
cSkeleton::IsChargingBow
bool IsChargingBow() const
Definition: Skeleton.h:29
cSkeleton::SpawnOn
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...
Definition: Skeleton.cpp:101
cSkeleton::IsUndead
virtual bool IsUndead(void) override
Returns whether this mob is undead (skeleton, zombie, etc.)
Definition: Skeleton.h:27
CLASS_PROTODEF
#define CLASS_PROTODEF(classname)
Definition: Entity.h:13
cSkeleton::Tick
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
Definition: Skeleton.cpp:40
cSkeleton::GetDrops
virtual void GetDrops(cItems &a_Drops, cEntity *a_Killer=nullptr) override
Returns the list of drops for this pawn when it is killed.
Definition: Skeleton.cpp:22
cSkeleton::m_ChargingBow
bool m_ChargingBow
Definition: Skeleton.h:33
AggressiveMonster.h
cItems
This class bridges a vector of cItem for safe access via Lua.
Definition: Item.h:213
cSkeleton::cSkeleton
cSkeleton()
Definition: Skeleton.cpp:12
cChunk
Definition: Chunk.h:35
cEntity
Definition: Entity.h:75
cSkeleton::Attack
virtual bool Attack(std::chrono::milliseconds a_Dt) override
Try to perform attack returns true if attack was deemed successful (hit player, fired projectile,...
Definition: Skeleton.cpp:62
cSkeleton
Definition: Skeleton.h:10
cAggressiveMonster::cAggressiveMonster
cAggressiveMonster(const AString &a_ConfigName, eMonsterType a_MobType, const AString &a_SoundHurt, const AString &a_SoundDeath, const AString &a_SoundAmbient, float a_Width, float a_Height)
Definition: AggressiveMonster.cpp:14
cAggressiveMonster
Definition: AggressiveMonster.h:10