#pragma once #include "aicomponent.h" enum ZombieState_e { ZSE_Idle = 0, ZSE_Thinking = 1, ZSE_Attack = 2, ZSE_RandomWalk = 3, ZSE_Pursuit = 4 }; class Human; class ZombieAINode; class ZombieModeAI : public AIComponent { public: ZombieModeAI(); virtual ~ZombieModeAI() override; virtual void Update(int delta_time) override; virtual void Reset() override; float GetAttackRate(); private: void UpdateAI(); void UpdateIdle(); void UpdateThinking(); void UpdateAttack(); void UpdateRandomWalk(); void UpdatePursuit(); void DoMove(); void ChangeToState(ZombieState_e to_state); void DoShot(); void DoSkill(); Human* GetTarget(); float GetAttackRange(); int GetAttackTimes(); private: ZombieAINode* node_ = nullptr; };