GameFramework.AiLogic_Npc_Member.OnStateLogicCheck C# (CSharp) Method

OnStateLogicCheck() protected method

protected OnStateLogicCheck ( EntityInfo entity, long deltaTime ) : bool
entity EntityInfo
deltaTime long
return bool
        protected override bool OnStateLogicCheck(EntityInfo entity, long deltaTime)
        {
            if (entity.IsDead()) {
                if (entity.GetAiStateInfo().CurState != (int)AiStateId.Idle) {
                    NotifyAiStopPursue(entity);
                    ChangeToState(entity, (int)AiStateId.Idle);
                }
                return false;
            }
            if (IsLeaderDead(entity)) {
                entity.SetHp(Operate_Type.OT_Absolute, 0);
                return false;
            }
            return true;
        }