protected ActorAIBase(ActorBase owner, AIModeType mode, float atkDist, float followDist, float waringDist, float findEnemyInterval) { this.Owner = owner; this.AIMode = mode; this.AttackDist = atkDist; this.FollowDist = followDist; this.WaringDist = waringDist; this.FindEnemyInterval = findEnemyInterval; }
public ActorFsmAI(ActorBase owner, AIModeType mode, float atkDist, float followDist, float waringDist, float findEnemyInterval) : base(owner, mode, atkDist, followDist, waringDist, findEnemyInterval) { FsmState <ActorBase>[] states = { }; //m_Fsm = GameEntry.Fsm.CreateFsm(owner, states); //m_Fsm.Start<ActorIdleFsm>(); }
public ActorFsmAI(ActorBase owner, AIModeType mode, float atkDist, float followDist, float waringDist, float findEnemyInterval) : base(owner, mode, atkDist, followDist, waringDist, findEnemyInterval) { m_FsmName = GlobalTools.Format("ActorAIFsm[{0}][{1}]", Owner.Id, owner.EntityId); FsmState <ActorBase>[] states = { new AIEmptyState(AIStateType.Empty), new AIIdleState(AIStateType.Idle), new AIFollowState(AIStateType.Follow), new AIFleeState(AIStateType.Flee), new AIPatrolState(AIStateType.Patrol), new AIEscapeState(AIStateType.Escape), new AIBackState(AIStateType.Back), new AIFightState(AIStateType.Fight), new AIDeadState(AIStateType.Dead), new AIChaseState(AIStateType.Chase), }; m_AIFsm = GameEntry.Fsm.CreateFsm(m_FsmName, Owner as ActorBase, states); }
public virtual void ChangeAIMode(AIModeType mode) { if (AIMode == mode) { return; } AIMode = mode; switch (mode) { case AIModeType.Auto: Start(); break; case AIModeType.Hand: Stop(); break; } }
public ChangeAiModeEventArgs Fill(AIModeType mode) { this.AiMode = mode; return(this); }
public OnPlayerAiModeChangeEventArgs Fill(AIModeType mode) { this.AiMode = mode; return(this); }