コード例 #1
0
    protected override void Awaken()
    {
        /*base.Awaken();
         * _bear.bearAnimationState = Rooster.ROOSTER_ANIMATIONSTATE.BEAR_SLEEP_END;*/

        if (_wakeUpTimer >= _wakeUpDuration)
        {
            _rooster.ChangeState(new RoosterIdleState());
        }
    }
コード例 #2
0
    protected override void Eat()
    {
        base.Eat();
        _rooster.roosterAnimationState= Rooster.ROOSTER_ANIMATIONSTATE.ARM_COCK_EAT;

        if (_drinkTimer >= _drinkDuration)
        {
            _rooster.ChangeState(new RoosterPatrolState());
        }
    }
コード例 #3
0
    protected override void FindWater()
    {
        _rooster.FindWater();
        _rooster.roosterAnimationState = Rooster.ROOSTER_ANIMATIONSTATE.ARM_COCK_WALK_SEARCH;

        if (_rooster._navMeshAgent.remainingDistance <= 0f)
        {
            _rooster.ChangeState(new RoosterDrinkState());
        }
    }
コード例 #4
0
    protected override void Patrol()
    {
        base.Patrol();
        _rooster.Destination();
        _rooster.roosterAnimationState = Rooster.ROOSTER_ANIMATIONSTATE.ARM_COCK_WALK_SLOW;

        if (_patrolTimer >= _patrolDuration)
        {
            _rooster.ChangeState(new RoosterIdleState());
        }
    }
コード例 #5
0
 protected override void TakeDamage()
 {
     if (!_tookDamage)
     {
         _rooster.TakeDamage(5);
         _rooster.roosterAnimationState = Rooster.ROOSTER_ANIMATIONSTATE.ARM_COCK_HIT;
         _tookDamage = true;
     }
     else
     {
         _rooster.ChangeState(new RoosterIdleState());
     }
 }
コード例 #6
0
    protected override void Idle()
    {
        base.Idle();

        if (_idleType == 1)
        {
            _rooster.roosterAnimationState = Rooster.ROOSTER_ANIMATIONSTATE.ARM_COCK_IDLE_1;
        }
        else
        {
            _rooster.roosterAnimationState = Rooster.ROOSTER_ANIMATIONSTATE.ARM_COCK_IDLE_2;
        }

        if (_idleTimer >= _idleDuration)
        {
            _rooster.ChangeState(new RoosterPatrolState());
        }
    }