Пример #1
0
    private void OnModeChanged(int value)
    {
        ScenarioPlayMode mode = playmodes[value]; //mapped from this, so can be reversed

        if (mode == ScenarioPlayMode.Timed)
        {
            timedContainer.gameObject.SetActive(true);
            timetrialContainer.gameObject.SetActive(false);
            untimedContainer.gameObject.SetActive(false);
        }
        else if (mode == ScenarioPlayMode.TimeTrial)
        {
            timedContainer.gameObject.SetActive(false);
            timetrialContainer.gameObject.SetActive(true);
            untimedContainer.gameObject.SetActive(false);
        }
        else if (mode == ScenarioPlayMode.Untimed)
        {
            timedContainer.gameObject.SetActive(false);
            timetrialContainer.gameObject.SetActive(false);
            untimedContainer.gameObject.SetActive(true);
        }
        else
        {
            Debug.LogError("Unknown playmode discovered. Index out of range or new mode not implemented?");
        }
    }
Пример #2
0
    public void Play()
    {
        ScenarioPlayMode mode = playmodes[modeDropdown.value];

        if (mode == ScenarioPlayMode.Timed)
        {
            SOSingleton <ScenarioManager> .sharedInstance.PlayScenarioTimed(scenarioInfo, scenarioInfo.timePresets[timeDropdown.value]);
        }
        else if (mode == ScenarioPlayMode.TimeTrial)
        {
            SOSingleton <ScenarioManager> .sharedInstance.PlayScenarioTimeTrial(scenarioInfo, scenarioInfo.amountToKillPresets[amountToKillDropdown.value]);
        }
        else if (mode == ScenarioPlayMode.Untimed)
        {
            SOSingleton <ScenarioManager> .sharedInstance.PlayScenarioUntimed(scenarioInfo);
        }
        else
        {
            Debug.LogError("Unknown playmode discovered. Index out of range or new mode not implemented?");
        }
    }
Пример #3
0
 public void SetPlayMode(ScenarioPlayMode mode)
 {
     playMode = mode;
 }