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(); }
private void Awake() { if (instance == null) { instance = this; saveFacade = new SaveFacade(); } else { Destroy(gameObject); } }
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(); }
private void KeepDataReadyForSaving() { ClassInfo.PrepareClassesBonusesForSaving(); CardsLevel.PrepareForSaving(); mapsCache.PrepareAllMapsForSaving(); }