public void OnClick_Play()
        {
            // Get mission parameters
            ListBoxItemContents itemContents = _MissionListBox.SelectedItemData as ListBoxItemContents;

            // Set mission parameters
            SceneParameters.SetMissionStartParameters(itemContents.MissionFilePath, 0);

            // Launch game
            Destroy(gameObject);

            SceneManager.LoadScene("Game");
        }
Beispiel #2
0
        public void OnClick_Play()
        {
            // Get mission parameters
            ListBoxItemContents itemContents = _MissionListBox.SelectedItemData as ListBoxItemContents;
            int difficultyIndex;

            for (difficultyIndex = 0; difficultyIndex < _ToggleDifficulty.Length; ++difficultyIndex)
            {
                if (_ToggleDifficulty[difficultyIndex].isOn)
                {
                    break;
                }
            }

            // Set mission parameters
            SceneParameters.SetMissionStartParameters(itemContents.MissionFilePath, difficultyIndex);

            // Launch game
            Destroy(gameObject);

            SceneManager.LoadScene("Game");
        }