protected override void Flee() { _cow.cowAnimationState = Cow.COW_ANIMATIONSTATE.COW_RUN; if ((_cow.transform.position - _cow.target.transform.position).magnitude >= 10) { _cow.target = null; _cow.ChangeState(new CowAlertState()); } }
protected override void Eat() { base.Eat(); _cow.cowAnimationState = Cow.COW_ANIMATIONSTATE.COW_EAT; if (_drinkTimer >= _drinkDuration) { _cow.ChangeState(new CowPatrolState()); } }
protected override void Sleeping() { base.Sleeping(); _cow.cowAnimationState = Cow.COW_ANIMATIONSTATE.COW_SLEEP_START; if (_sleepTimer >= _sleepDuration) { _cow.ChangeState(new CowAwakenState()); } }
protected override void Awaken() { base.Awaken(); _cow.cowAnimationState = Cow.COW_ANIMATIONSTATE.COW_SLEEP_END; if (_wakeUpTimer >= _wakeUpDuration) { _cow.ChangeState(new CowIdleState()); } }
protected override void FindWater() { _cow.FindWater(); _cow.cowAnimationState = Cow.COW_ANIMATIONSTATE.COW_WALK; if (_cow._navMeshAgent.remainingDistance <= 0f) { _cow.ChangeState(new CowDrinkState()); } }
protected override void Alert() { base.Alert(); _cow.cowAnimationState = Cow.COW_ANIMATIONSTATE.COW_IDLE; if (_alertTimer >= _alertDuration) { _cow.ChangeState(new CowPatrolState()); } }
protected override void Patrol() { base.Patrol(); _cow.Destination(); _cow.cowAnimationState = Cow.COW_ANIMATIONSTATE.COW_WALK; if (_patrolTimer >= _patrolDuration) { _cow.ChangeState(new CowIdleState()); } }
protected override void TakeDamage() { if (!_tookDamage) { _cow.TakeDamage(5); _cow.cowAnimationState = Cow.COW_ANIMATIONSTATE.COW_HIT; _tookDamage = true; } else { _cow.ChangeState(new CowIdleState()); } }
protected override void Idle() { base.Idle(); if (_idleType == 1) { _cow.cowAnimationState = Cow.COW_ANIMATIONSTATE.COW_IDLE; } else { _cow.cowAnimationState = Cow.COW_ANIMATIONSTATE.COW_IDLE_SEARCH; } if (_idleTimer >= _idleDuration) { _cow.ChangeState(new CowPatrolState()); } }