Example #1
0
        protected override void Prepare()
        {
            AIMoveStyle moveStyle = this.m_AI.m_MoveStyle;

            this.m_AI.m_MoveStyle = this.GetWantedMoveStyle();
            this.m_AI.m_PathModule.CalcPath(PathModule.PathType.MoveAwayFromEnemy);
            if (this.m_AI.m_ID != AI.AIID.Peccary && this.m_AI.m_ID != AI.AIID.Capybara)
            {
                base.Prepare();
                return;
            }
            if ((moveStyle == AIMoveStyle.Walk && this.m_AI.m_MoveStyle == AIMoveStyle.Run) || this.m_AI.m_GoalsModule.m_PreviousAction == null || (this.m_AI.m_GoalsModule.m_PreviousAction.GetType() != typeof(MoveTo) && this.m_AI.m_GoalsModule.m_PreviousAction.GetType() != typeof(StartMove)))
            {
                base.StartAction(this.m_StartMove);
                return;
            }
            base.Prepare();
        }
Example #2
0
 public void SetupParams(Vector3 start, GameObject target, AIMoveStyle style, float radius)
 {
     this.m_TargetObject = target;
     this.SetupTargetPos();
 }