Example #1
0
 private void NewGame()
 {
     Map.StartOfMatch = true;
     CardsLevel.Clear();
     PlayerAndEnemyDeckHolder.PrepareFirstDeckIfNeededForThePlayerAndGetReadyForSaving(forceToPrepare: true);
     sceneOpener.OpenMapScene();
 }
    private IEnumerator SaveAndQuitCoroutine()
    {
        openerOfPopUpsMadeInEditor.SetLoadingPopUpActiveToTrueAndDeactivateTips();
        yield return(null);

        deck.PrepareDeckForPlayerAndGetReadyForSaving();
        CardsLevel.PrepareForSaving();
        sceneOpener.OpenMapScene();
    }
Example #3
0
 private void Awake()
 {
     if (instance == null)
     {
         instance   = this;
         saveFacade = new SaveFacade();
     }
     else
     {
         Destroy(gameObject);
     }
 }
Example #4
0
    private void BringAllDataFromStorage()
    {
        // Preparing for load
        string[] mapNames = GetMapNames();
        mapsCache.PrepareMapsForLoading(mapNames);

        if (ShouldLoadEverything)
        {
            saveFacade.LoadEverything();
        }

        // Copying loaded information into the game classes.
        mapsCache.FillMapsCacheUsingLoadedFiles(mapNames);
        CopyDataFromMapsCacheToSceneSpots();
        ClassInfo.CopyLoadedClassesToAttributes();
        CardsLevel.CopyLoadedDataToAttributes();
    }
Example #5
0
 private void KeepDataReadyForSaving()
 {
     ClassInfo.PrepareClassesBonusesForSaving();
     CardsLevel.PrepareForSaving();
     mapsCache.PrepareAllMapsForSaving();
 }