Cuberite
A lightweight, fast and extensible game server for Minecraft
AggressiveMonster.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "Monster.h"
5 
6 
7 
8 
9 
11  public cMonster
12 {
13  using Super = cMonster;
14 
15 public:
16 
18  const AString & a_ConfigName,
19  eMonsterType a_MobType,
20  const AString & a_SoundHurt,
21  const AString & a_SoundDeath,
22  const AString & a_SoundAmbient,
23  float a_Width,
24  float a_Height
25  );
26 
27  virtual void Tick (std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
28  virtual void InStateChasing(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
29 
30 
31  virtual void EventSeePlayer(cPlayer * a_Player, cChunk & a_Chunk) override;
32 
41  cMonster * GetMonsterOfTypeInSight(eMonsterType a_mobtype, unsigned int SightDistance=16);
42 
46  virtual bool Attack(std::chrono::milliseconds a_Dt);
47 } ;
eMonsterType
Identifies individual monster type.
Definition: MonsterTypes.h:11
std::string AString
Definition: StringUtils.h:11
Definition: Chunk.h:36
Definition: Entity.h:76
Definition: Player.h:29
virtual void EventSeePlayer(cPlayer *a_Player, cChunk &a_Chunk) override
virtual bool Attack(std::chrono::milliseconds a_Dt)
Try to perform attack returns true if attack was deemed successful (hit player, fired projectile,...
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
virtual void InStateChasing(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
cMonster * GetMonsterOfTypeInSight(eMonsterType a_mobtype, unsigned int SightDistance=16)
Check if a monster of certain type is in sight.
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)
cMonster(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)
Creates the mob object.
Definition: Monster.cpp:84