Exemplo n.º 1
0
    protected override void FindWater()
    {
        _ram.FindWater();
        _ram.ramAnimationState = Ram.RAM_ANIMATIONSTATE.ARM_RAM_WALK;

        if (_ram._navMeshAgent.remainingDistance <= 0f)
        {
            _ram.ChangeState(new RamDrinkState());
        }
    }
Exemplo n.º 2
0
    protected override void Awaken()
    {
        base.Awaken();
        _ram.ramAnimationState = Ram.RAM_ANIMATIONSTATE.ARM_RAM_SLEEP_END;

        if (_wakeUpTimer >= _wakeUpDuration)
        {
            _ram.ChangeState(new RamIdleState());
        }
    }
Exemplo n.º 3
0
    protected override void Eat()
    {
        base.Eat();
        _ram.ramAnimationState = Ram.RAM_ANIMATIONSTATE.ARM_RAM_EAT_1;

        if (_drinkTimer >= _drinkDuration)
        {
            _ram.ChangeState(new RamPatrolState());
        }
    }
Exemplo n.º 4
0
    protected override void Sleeping()
    {
        base.Sleeping();
        _ram.ramAnimationState = Ram.RAM_ANIMATIONSTATE.ARM_RAM_SLEEP_START;

        if (_sleepTimer >= _sleepDuration)
        {
            _ram.ChangeState(new RamAwakenState());
        }
    }
    protected override void Patrol()
    {
        base.Patrol();
        _ram.Destination();
        _ram.ramAnimationState = Ram.RAM_ANIMATIONSTATE.ARM_RAM_WALK;

        if (_patrolTimer >= _patrolDuration)
        {
            _ram.ChangeState(new RamIdleState());
        }
    }
 protected override void TakeDamage()
 {
     if (!_tookDamage)
     {
         _ram.TakeDamage(5);
         _ram.ramAnimationState = Ram.RAM_ANIMATIONSTATE.ARM_RAM_HIT_FRONT;
         _tookDamage            = true;
     }
     else
     {
         _ram.ChangeState(new RamIdleState());
     }
 }
Exemplo n.º 7
0
    protected override void Idle()
    {
        base.Idle();

        if (_idleType == 1)
        {
            _ram.ramAnimationState = Ram.RAM_ANIMATIONSTATE.ARM_RAM_IDLE_1;
        }
        else
        {
            _ram.ramAnimationState = Ram.RAM_ANIMATIONSTATE.ARM_RAM_IDLE_2;
        }

        if (_idleTimer >= _idleDuration)
        {
            _ram.ChangeState(new RamPatrolState());
        }
    }