/// <summary> /// Fires when one game exits /// </summary> //public event GameExitHandler SessionExited; #endregion #region Unity callbacks public void SetupGame(MainGameData gameData) { currentSessionRuleset = gameData.Ruleset; // create & initialize gameplay = SceneActivationBehaviour <MainMenuActivator> .Instance.Gameplay; gameplay.Configure(gameData); // handlers gameplay.OnGameTimeChanged += GameTimeChangedHandler; gameplay.OnGameStarted += GameStartedHandler; gameplay.OnPaused += PausedHandler; gameplay.OnResumed += ResumedHandler; gameplay.OnGameOver += GameOverHandler; gameplay.OnGameQuit += GameQuitHandler; }
/// <summary> /// Fires when one game exits /// </summary> //public event GameExitHandler SessionExited; #endregion #region Unity callbacks public void SetupGame(MainGameData gameData) { currentSessionRuleset = gameData.Ruleset; // create & initialize gameplay = SceneActivationBehaviour <SPEGameSceneActivator> .Instance.Gameplay; //Instantiate(currentSessionRuleset.GameBoardPrefab); gameplay.Configure(gameData); // handlers gameplay.OnGameTimeChanged += GameTimeChangedHandler; gameplay.OnGameStarted += GameStartedHandler; gameplay.OnPaused += PausedHandler; gameplay.OnResumed += ResumedHandler; gameplay.OnGameOver += GameOverHandler; gameplay.OnGameQuit += GameQuitHandler; //gameplay.OnGameExit += GameExitHandler; //// go! //gameplay.StartSession(); //return gameplay; }