コード例 #1
0
ファイル: EventService.cs プロジェクト: limonlimonn/Race
        public void Init()
        {
            _uiManager = Core.Instance.GetService <UIManager>();
            Assert.AreNotEqual(null, _uiManager);

            _eventWindow = _uiManager.GetWindow(UIWindowEnum.EVENT) as EventWindow;

            _mainScreenStateManager = _uiManager.Get_MainScreenStateManager();
            Assert.AreNotEqual(null, _mainScreenStateManager);

            _playerManager = Core.Instance.GetService <PlayerManager>();
            Assert.AreNotEqual(null, _playerManager);

            _uiAnimatorManager = Core.Instance.GetService <UIAnimatorManager>();
            Assert.AreNotEqual(null, _uiAnimatorManager);

            _audioService = Core.Instance.GetService <AudioService>();
            Assert.AreNotEqual(null, _audioService);

            _header = _uiManager.GetWindow(UIWindowEnum.HEADER) as Header;

            _scorePanel = _uiManager.GetWindow(UIWindowEnum.SCORE) as ScorePanel;

            InitEvents();

            _scorePanel.FillShop();
        }
コード例 #2
0
        // METHODS

        private void InitVariables()
        {
            _uiManager = Core.Instance.GetService <UIManager>();
            Assert.AreNotEqual(null, _uiManager);

            _multiplayerWindow = _uiManager.GetWindow(UIWindowEnum.MAIN_MULTIPLAYER) as MultiplayerWindow;
            Assert.AreNotEqual(null, _multiplayerWindow);

            _chooseCarWindow = _uiManager.GetWindow(UIWindowEnum.CHOOSE_CAR) as ChooseCarWindow;
            Assert.AreNotEqual(null, _chooseCarWindow);

            _treeWindow = _uiManager.GetWindow(UIWindowEnum.TREE_UPGRADE) as TreeWindow;
            Assert.AreNotEqual(null, _treeWindow);

            _settingsWindow = _uiManager.GetWindow(UIWindowEnum.SETTINGS) as SettingsWindow;
            Assert.AreNotEqual(null, _settingsWindow);

            _chooseTrackWindow = _uiManager.GetWindow(UIWindowEnum.CHOOSE_TRACK) as ChooseTrackWindow;
            Assert.AreNotEqual(null, _chooseTrackWindow);

            //
            _gameWindowAsync = _uiManager.GetWindow(UIWindowEnum.GAMEWINDOW_ASYNC) as _AsyncMulty.GameWindowAsyncMultiplayer;
            Assert.AreNotEqual(null, _gameWindowAsync);

            _gameWindowSingleplayer = _uiManager.GetWindow(UIWindowEnum.GAMEWINDOW_SINGLE) as _Single.GameWindowSingleplayer;
            Assert.AreNotEqual(null, _gameWindowSingleplayer);

            // tutorial

            _gameWindowTutorial = _uiManager.GetWindow(UIWindowEnum.GAMEWINDOW_TUTORIAL) as _Tutorial.GameWindowTutorial;
            Assert.AreNotEqual(null, _gameWindowTutorial);

            _statisticPanel = _uiManager.GetWindow(UIWindowEnum.STATISTIC) as StatisticPanel;
            Assert.AreNotEqual(null, _statisticPanel);

            _scorePanel = _uiManager.GetWindow(UIWindowEnum.SCORE) as ScorePanel;
            Assert.AreNotEqual(null, _scorePanel);

            _eventWindow = _uiManager.GetWindow(UIWindowEnum.EVENT) as EventWindow;
            Assert.AreNotEqual(null, _eventWindow);
        }
コード例 #3
0
        private void Init_GlobalWindows()
        {
            _authentificationWindow = GetComponentInChildren <AuthentificationWindow>();
            Assert.AreNotEqual(null, _authentificationWindow);

            //
            _multiplayerWindow = GetComponentInChildren <MultiplayerWindow>();
            Assert.AreNotEqual(null, _multiplayerWindow);

            _header = GetComponentInChildren <Header>();
            Assert.AreNotEqual(null, _header);

            _chooseCarWindow = GetComponentInChildren <ChooseCarWindow>();
            Assert.AreNotEqual(null, _chooseCarWindow);

            _chooseTrackWindow = GetComponentInChildren <ChooseTrackWindow>();
            Assert.AreNotEqual(null, _chooseTrackWindow);

            _treeWindow = GetComponentInChildren <TreeWindow>();
            Assert.AreNotEqual(null, _treeWindow);

            _settingsWindow = GetComponentInChildren <SettingsWindow>();
            Assert.AreNotEqual(null, _settingsWindow);

            _statisticPanel = GetComponentInChildren <StatisticPanel>();
            Assert.AreNotEqual(null, _statisticPanel);
            //
            _splashScreen = GetComponentInChildren <SplashScreen>();
            Assert.AreNotEqual(null, _splashScreen);

            _scorePanel = GetComponentInChildren <ScorePanel>();
            Assert.AreNotEqual(null, _scorePanel);

            _eventWindow = GetComponentInChildren <EventWindow>();
            Assert.AreNotEqual(null, _eventWindow);

            _enternetWindow = GetComponentInChildren <EnternetWindow>();
            Assert.AreNotEqual(null, _enternetWindow);
        }