protected override void GoToAttack() { if (_targetAC.IsAlived) { _owner.ACStop(); //we need close player and attack _currentSeekMode = _nextSeekMode = SEEK_MODE.NONE; //for wander use _inSeek = false; StopAllCoroutines(); base.GoToAttack(); } else { //SetNextState(AIAgent.STATE.IDLE); } }
protected void ChangeToSeekMode() { _currentSeekMode = _nextSeekMode; _nextSeekMode = SEEK_MODE.NONE; switch (_currentSeekMode) { case SEEK_MODE.FOLLOW_LEADER: StartCoroutine(FOLLOW_LEADER()); break; case SEEK_MODE.COPY_PLAYER: StartCoroutine(COPY_PLAYER()); break; case SEEK_MODE.FEINT_ATTACK: StartCoroutine(FEINT_ATTACK()); break; case SEEK_MODE.IDLE: StartCoroutine(IDLE()); break; case SEEK_MODE.RUN_AWAY_AFTER_ATTACK: StartCoroutine(RUN_AWAY_AFTER_ATTACK()); break; case SEEK_MODE.RUN_AWAY_AFTER_HURT: StartCoroutine(RUN_AWAY_AFTER_HURT()); break; case SEEK_MODE.WANDER_BY_SIMPLE_PATH: StartCoroutine(WANDER_BY_SIMPLE_PATH()); break; case SEEK_MODE.WANDER_TO_PLAYER: StartCoroutine(WANDER_TO_PLAYER()); break; } }
protected void SetNextSeekMode(SEEK_MODE seekMode) { _inSeek = false; _nextSeekMode = seekMode; }