Exemplo n.º 1
0
    protected override void Eat()
    {
        base.Eat();
        _bear.bearAnimationState = Bear.BEAR_ANIMATIONSTATE.BEAR_EAT;

        if (_drinkTimer >= _drinkDuration)
        {
            _bear.ChangeState(new BearPatrolState());
        }
    }
Exemplo n.º 2
0
    protected override void Sleeping()
    {
        base.Sleeping();
        _bear.bearAnimationState = Bear.BEAR_ANIMATIONSTATE.BEAR_SLEEP_START;

        if (_sleepTimer >= _sleepDuration)
        {
            _bear.ChangeState(new BearAwakenState());
        }
    }
Exemplo n.º 3
0
    protected override void FindWater()
    {
        _bear.FindWater();
        _bear.bearAnimationState = Bear.BEAR_ANIMATIONSTATE.BEAR_WALK;

        if (_bear._navMeshAgent.remainingDistance <= 0f)
        {
            _bear.ChangeState(new BearDrinkState());
        }
    }
    protected override void Awaken()
    {
        base.Awaken();
        _bear.bearAnimationState = Bear.BEAR_ANIMATIONSTATE.BEAR_SLEEP_END;

        if (_wakeUpTimer >= _wakeUpDuration)
        {
            _bear.ChangeState(new BearIdleState());
        }
    }
Exemplo n.º 5
0
    protected override void Patrol()
    {
        base.Patrol();
        _bear.Destination();
        _bear.bearAnimationState = Bear.BEAR_ANIMATIONSTATE.BEAR_WALK;

        if (_patrolTimer >= _patrolDuration)
        {
            _bear.ChangeState(new BearIdleState());
        }
    }
 protected override void TakeDamage()
 {
     if (!_tookDamage)
     {
         _bear.TakeDamage(5);
         _bear.bearAnimationState = Bear.BEAR_ANIMATIONSTATE.BEAR_HIT;
         _tookDamage = true;
     }
     else
     {
         _bear.ChangeState(new BearIdleState());
     }
 }
Exemplo n.º 7
0
    protected override void Idle()
    {
        base.Idle();

        if (_idleType == 1)
        {
            _bear.bearAnimationState = Bear.BEAR_ANIMATIONSTATE.BEAR_IDLE;
        }
        else
        {
            _bear.bearAnimationState = Bear.BEAR_ANIMATIONSTATE.BEAR_IDLE_SEARCH;
        }

        if (_idleTimer >= _idleDuration)
        {
            _bear.ChangeState(new BearPatrolState());
        }
    }