Пример #1
0
        private void Awake()
        {
            _loadWindow = GetComponentInChildren <LoadWindow>(true);
            _loadWindow.Init(this);
            _loadWindow.Close();

            _playerSettingsWindow =
                GetComponentInChildren <PlayerSettings>(true);
            _playerSettingsWindow.Init(this);
            _playerSettingsWindow.Close();
        }
Пример #2
0
        public void StartGame(List <PlayerData> playerDatas)
        {
            _playerSettingsWindow.Close();

            // Create a new GameData object and initialize if with playerDatas list.
            Global.Instance.CurrentGameData = new GameData()
            {
                Level       = 1,
                PlayerDatas = playerDatas
            };

            // Perform a transition to in game state.
            Global.Instance.GameManager.PerformTransition(
                GameStateTransitionType.MenuToInGame);
        }