protected override void FindWater() { _pig.FindWater(); _pig.pigAnimationState = Pig.PIG_ANIMATIONSTATE.PIG_WALK; if (_pig._navMeshAgent.remainingDistance <= 0f) { _pig.ChangeState(new PigDrinkState()); } }
protected override void Awaken() { base.Awaken(); _pig.pigAnimationState = Pig.PIG_ANIMATIONSTATE.PIG_SLEEP_END; if (_wakeUpTimer >= _wakeUpDuration) { _pig.ChangeState(new PigIdleState()); } }
protected override void Eat() { base.Eat(); _pig.pigAnimationState = Pig.PIG_ANIMATIONSTATE.PIG_EAT; if (_drinkTimer >= _drinkDuration) { _pig.ChangeState(new PigPatrolState()); } }
protected override void Sleeping() { base.Sleeping(); _pig.pigAnimationState = Pig.PIG_ANIMATIONSTATE.PIG_SLEEP_START; if (_sleepTimer >= _sleepDuration) { _pig.ChangeState(new PigAwakenState()); } }
protected override void Patrol() { base.Patrol(); _pig.Destination(); _pig.pigAnimationState = Pig.PIG_ANIMATIONSTATE.PIG_WALK; if (_patrolTimer >= _patrolDuration) { _pig.ChangeState(new PigIdleState()); } }
protected override void TakeDamage() { if (!_tookDamage) { _pig.TakeDamage(5); _pig.pigAnimationState = Pig.PIG_ANIMATIONSTATE.PIG_HIT_FRONT; _tookDamage = true; } else { _pig.ChangeState(new PigIdleState()); } }
protected override void Idle() { base.Idle(); if (_idleType == 1) { _pig.pigAnimationState = Pig.PIG_ANIMATIONSTATE.PIG_IDLE_1; } else { _pig.pigAnimationState = Pig.PIG_ANIMATIONSTATE.PIG_IDLE_2; } if (_idleTimer >= _idleDuration) { _pig.ChangeState(new PigPatrolState()); } }