Пример #1
0
    public void UpdateState()
    {
        // Returning to the unique position
        if (!initial_position_achieved)
        {
            ReturningInitialPosition();
        }

        // If the alarm is turned off, the enemy reverts its current state to Patrol
        if (!rhandor.alarm_system.isAlarmActive())
        {
            if (rhandor.neutral_patrol.static_patrol)
            {
                ToIdleState();
            }
            else
            {
                ToPatrolState();
            }
        }

        if (!rhandor.alert_patrol.static_patrol)
        {
            rhandor.CheckNextMovement(rhandor.alert_patrol);
        }
    }
Пример #2
0
    public void UpdateState()
    {
        // If the alarm is active, the enemy change its current state to Alert
        if (rhandor.alarm_system.isAlarmActive())
        {
            ToAlertState();
        }

        rhandor.CheckNextMovement(rhandor.neutral_patrol);
    }