Beispiel #1
0
    void HandleNextEnemyTurn(Enemy enemy)
    {
        Location      currentLocation = characterLocations[enemy];
        SwitchesStory switchesStory   = storiesHelper.Get <SwitchesStory>();

        if (switchesStory.doesLocationContainAvailableSwitch(currentLocation) && Random.Range(0, 99) > SwitchActivationPercentage)
        {
            TriggerDoorSwitch(enemy, currentLocation);
        }
        else
        {
            MoveEnemy(enemy, currentLocation);
        }
    }