Esempio n. 1
0
    /// <summary>
    /// returns the currently active game
    /// (if there is none, the current scene is used to create a new Game)
    /// </summary>
    /// <returns></returns>
    private static SaveableGame GetCurrentGame()
    {
        if (GameDataController == null)
        {
            //Debug.LogWarning("Current Game was requested before the game was loaded. " +
            //    "This should be avoided by loading an existing game or starting a new one out of a menue" +
            //    " with no saveable objects in its scene.");

            GamePersistence.EnterRunningGame();
        }

        return(GameDataController.GetCurrentGame());
    }