diff options
Diffstat (limited to 'src/Mobs/Behaviors/Behavior.h')
-rw-r--r-- | src/Mobs/Behaviors/Behavior.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Mobs/Behaviors/Behavior.h b/src/Mobs/Behaviors/Behavior.h new file mode 100644 index 000000000..27833cc9b --- /dev/null +++ b/src/Mobs/Behaviors/Behavior.h @@ -0,0 +1,30 @@ +#pragma once + +struct TakeDamageInfo; +class cChunk; +class cPlayer; +class cMonster; +class cPawn; +class cWorld; +class cItems; +class cEntity; +struct TakeDamageInfo; +#include <chrono> + +class cBehavior +{ +public: + // Tick-related + virtual bool IsControlDesired(std::chrono::milliseconds a_Dt, cChunk & a_Chunk); + virtual bool ControlStarting(std::chrono::milliseconds a_Dt, cChunk & a_Chunk); + virtual bool ControlEnding(std::chrono::milliseconds a_Dt, cChunk & a_Chunk); + virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk); + virtual void PostTick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk); + virtual void PreTick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk); + + // Other + virtual void OnRightClicked(cPlayer & a_Player); + virtual void Destroyed(); + virtual void DoTakeDamage(TakeDamageInfo & a_TDI); + virtual ~cBehavior() {} +}; |