Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     _uiManager         = Core.Instance.GetService <UIManager>();
     _chooseTrackWindow = _uiManager.GetWindow(UIWindowEnum.CHOOSE_TRACK) as ChooseTrackWindow;
     Assert.AreNotEqual(null, NotificationsCanvas);
     Assert.AreNotEqual(null, GameAnswerCanvas);
     Assert.AreNotEqual(null, GameAnswerText);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
        // I_SERVICE

        public void Init()
        {
            Games = new List <GameData>();

            //
            _networkManager = Core.Instance.GetService <NetworkManager>();
            Assert.AreNotEqual(null, _networkManager);

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

            _statesManager = Core.Instance.GetService <StatesManager>();
            Assert.AreNotEqual(null, _statesManager);

            //
            _uiManager = Core.Instance.GetService <UIManager>();
            Assert.AreNotEqual(null, _uiManager);

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

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

            _splashScreen = _uiManager.GetWindow(UIWindowEnum.SPLASH) as SplashScreen;
            Assert.AreNotEqual(null, _splashScreen);

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



            _safePlayerPrefs = Core.Instance.GetService <SafePlayerPrefs>();
            Assert.AreNotEqual(null, _safePlayerPrefs);

            _header = _uiManager.GetWindow(UIWindowEnum.HEADER) as Header;
            Assert.AreNotEqual(null, _header);

            _enternetWindow = _uiManager.GetWindow(UIWindowEnum.IS_ENTERNET) as EnternetWindow;
            Assert.AreNotEqual(null, _enternetWindow);

            _carParent = GameObject.Find("CarParent").transform;
            _podiumNew = _carParent.Find("PodiumNew").gameObject;



            // =======================================================
            //

            /*
             * TrackNamesById = new Dictionary<int, string>()
             * {
             *  {0,     ""    },
             *  {1,     ""     },
             *  {2,     ""    },
             *  {3,     ""      },
             *  {4,     ""    },
             *  {5,     "West_Indian_1"     },
             *  {6,     ""     },
             *  {7,     ""      },
             *  {8,     "West _Town_2"      },
             *  {9,     ""     },
             *  {10,    "West_Shahta_1"     },
             *  {11,    "West _Canyon_1"    },
             *  {12,    "West_Tornado"      },
             *  {13,    "Island"            },
             *  {14,    "West_Tunnel_3"     },
             *  {15,    "West_Mountains_2"   },
             *  {16,    "West _Koleso_2"   },
             *  {17,    "West _Canyon_2"   },
             *
             *
             *  {99,    "Tutorial1"   },
             *  {100,    "Tutorial2"   },
             * };
             */



            //

            /*
             * TrackTimeById = new Dictionary<int, TrackTimePrice>()
             * {
             *  {0,    new TrackTimePrice{Time = 120 , Price= 20  } },
             *  {1,    new TrackTimePrice{Time = 120 , Price = 21  } },
             *  {2,    new TrackTimePrice{Time = 120 , Price = 22  } },
             *  {3,    new TrackTimePrice{Time = 120 , Price = 23  } },
             *  {4,    new TrackTimePrice{Time = 120 , Price = 24  } },
             *  {5,    new TrackTimePrice{Time = 120 , Price = 25  } },
             *  {6,    new TrackTimePrice{Time = 120 , Price = 26  } },
             *  {7,    new TrackTimePrice{Time = 120 , Price= 27  } },
             *  {8,    new TrackTimePrice{Time = 120 , Price = 28  } },
             *  {9,    new TrackTimePrice{Time = 120 , Price= 29  } },
             *  {10,   new TrackTimePrice{Time = 120 , Price = 30  } },
             *  {11,   new TrackTimePrice{Time = 100 , Price = 31  } },
             *  {12,   new TrackTimePrice{Time = 72 , Price = 32  } },
             *  {13,   new TrackTimePrice{Time = 93 , Price = 33  } },
             *  {14,   new TrackTimePrice{Time = 74 , Price = 34  } },
             *  {15,   new TrackTimePrice{Time = 95 , Price = 35  } },
             *  {16,   new TrackTimePrice{Time = 76 , Price = 36  } },
             *  {17,   new TrackTimePrice{Time = 87 , Price = 37  } },
             *
             * };
             */
            // =======================================================

            _multiplayerWindow.OnSingleNew    += CreateNewSingleplayerGame;
            _multiplayerWindow.OnNewGame      += CreateNewGame;
            _multiplayerWindow.OnNewGameForFB += CreateNewGameForFB;
            IsEntryPointLoad = true;
        }