Esempio n. 1
0
    public void RestartSession()
    {
        Data.Reset();

        _motorcycleController.ResetMotorcycle();
        _roadGenerator.ResetRoad();

        SessionRestarted?.Invoke();
    }
        private void GameRestartedHandler(MainGameData gameData)
        {
            if (gameData != null)
            {
                IsInGame = false;

                // clean up gameboard
                SceneActivationBehaviour <BoardUIActivator> .Instance.DestroyBoard();

                SessionRestarted?.Invoke(gameData);
                currentSessionRuleset = null;

                StartCoroutine(SceneActivationBehaviour <GameLogicActivator> .Instance.GameController.StartGameHandler(gameData.Ruleset));
            }
        }