Example #1
0
    private void Awake()
    {
        m_GameMode = this;

        m_EventSystem = new EventSystem();

        m_GameLogic = new GameModeLogic();

        m_GameModeCamera = GetComponentInChildren <Camera>();
    }
    // Use this for initialization
    protected virtual void Start()
    {
        levelRecord = GameServiceLayer.serviceLayer.levelService.getLevelRecordForScene(Application.loadedLevel);
        playerSpawnerList = playerSpawnerList = GameServiceLayer.serviceLayer.playerSpawnerList;
        
        GameServiceLayer.serviceLayer.setCurrentGameMaster(this);

        setGameState(GameState.PREGAME);
        Screen.sleepTimeout = SleepTimeout.NeverSleep;
        Time.timeScale = 1;
        
        gameModeLogic = createGameModeLogic();
        gameModeLogic.initGame();
        
    }