diff options
Diffstat (limited to 'src/Mobs/Sheep.h')
-rw-r--r-- | src/Mobs/Sheep.h | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/Mobs/Sheep.h b/src/Mobs/Sheep.h index c8af067f3..89fa41edf 100644 --- a/src/Mobs/Sheep.h +++ b/src/Mobs/Sheep.h @@ -1,16 +1,18 @@ #pragma once -#include "PassiveMonster.h" - - +#include "Behaviors/BehaviorBreeder.h" +#include "Behaviors/BehaviorItemFollower.h" +#include "Behaviors/BehaviorCoward.h" +#include "Behaviors/BehaviorWanderer.h" +#include "Monster.h" class cSheep : - public cPassiveMonster + public cMonster { - typedef cPassiveMonster super; + typedef cMonster super; public: @@ -25,7 +27,7 @@ public: virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = nullptr) override; virtual void OnRightClicked(cPlayer & a_Player) override; virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override; - virtual void InheritFromParents(cPassiveMonster * a_Parent1, cPassiveMonster * a_Parent2) override; + virtual void InheritFromParents(cMonster * a_Parent1, cMonster * a_Parent2) override; virtual void GetFollowedItems(cItems & a_Items) override { @@ -41,12 +43,21 @@ public: int GetFurColor(void) const { return m_WoolColor; } void SetFurColor(int a_WoolColor) { m_WoolColor = a_WoolColor; } - private: - bool m_IsSheared; - int m_WoolColor; + + // Tick controlling behaviors + cBehaviorBreeder m_BehaviorBreeder; + cBehaviorItemFollower m_BehaviorItemFollower; + cBehaviorCoward m_BehaviorCoward; + cBehaviorWanderer m_BehaviorWanderer; + + // mobTodo transfer this to a behavior int m_TimeToStopEating; + // Behavior note: These are ship-specific things not transferrable to other mobs. + // Therefore they do not need a Behavior and can stay hardcoded in the sheep. + bool m_IsSheared; + int m_WoolColor; } ; |