//co rotina de transiçao de scena private IEnumerator Transition() { //se o index da cena escolido for menor que 0 -> erro if (chsSceneIndx < 0) { Debug.LogError("Scene index invalid."); yield break; } DontDestroyOnLoad(gameObject); //nao destoi no carregamento const string svF = "Save"; //referencia do arquivo de auto save SavingSystem svS = FindObjectOfType <SavingSystem>(); //referencia a script de salvar Fader fade = FindObjectOfType <Fader>(); //referencia do script para fade DisableCtrl(); //tira controles do personagem yield return(fade.FadeOut(fadeTimer)); //faz fade svS.Save(svF); //salva jogo yield return(SceneManager.LoadSceneAsync(chsSceneIndx)); //carrega cenario DisableCtrl(); //tira controles do personagem svS.Load(svF); //carrega save Portal otherPortal = GetOtherPortal(); //referencia do portal de entrada UpdatePlayer(otherPortal); //update as informacoes do jogador svS.Save(svF); //salva yield return(new WaitForSeconds(0.5f)); yield return(fade.FadeIn(fadeTimer)); //cria fade EnableCtrl(); //reativa os controles do personagem Destroy(gameObject); //deleta objeto }
public void SaveAndLoadTest() { string fileName = "TempUnitTestFile.bin"; HighScoreData highScoreDataSaved = new HighScoreData(); SavingSystem <HighScoreData> .Save(highScoreDataSaved, fileName); HighScoreData highScoreDataLoaded = SavingSystem <HighScoreData> .Load(fileName); Assert.AreEqual(highScoreDataSaved, highScoreDataLoaded); }
public void LoadSelectedGame() { if (!_savingSystem.SaveExists(_saveFileName)) { return; } GameManager.Instance.EndTitleMusic(); _savingSystem.Load(_saveFileName); Hide(); }
static async Task LoadApplications() { Console.WriteLine("Loading Application Forms"); Dictionary <string, object> loadedApplications = SavingSystem.Load(APPLICATIONS); foreach (object application in loadedApplications.Values) { Application loadedApplication = new Application("_LoadedApplication_"); await loadedApplication.RestoreState(application).ConfigureAwait(false); applications.Add(loadedApplication); Log("Application " + loadedApplication.Title + " : Loaded", ConsoleColor.Green); } Console.WriteLine("Loading Finished Applications"); Dictionary <string, object> loadedFinishedApplications = SavingSystem.Load(FINISHED_APPLICATIONS); foreach (object loadedFinishedApplication in loadedFinishedApplications.Values) { try { PendingApplication application = new PendingApplication(null, null, null, loadedFinishedApplication); await application.RestoreState(loadedFinishedApplication).ConfigureAwait(false); Log( "Pending Application " + application.Message.Id + " for " + application.Message.Channel.GuildId + " in " + application.Message.ChannelId + " : Loaded", ConsoleColor.Green); pendingApplications.Add(application); AddInteractivity(application); } catch { Log("Dead application found and skipped", ConsoleColor.Red); } } }
public void Load() { sSystem.Load(Constant.defaultSaveFile); }
public void Load() { // Call saving system to load _savingSystem.Load(_defaultSaveFile); }
/// <summary> /// Public interface for loading the game /// </summary> public void Load() { m_SaveSystem.Load(m_DefaultSaveFile); }
public void Load() { print("Load"); savingSystem.Load(defaultSaveFile); }
private void Load() { savingSystem.Load(defaultSaveFile); }
public void Load() { _savingSystem.Load(DefaultSaveFile); }
public void Load() { savingSystem.Load(defaultSaveFile); }
public void LoadCurrentHighScore() { HighScoreData highScoreData = SavingSystem <HighScoreData> .Load(fileName); _highScore = highScoreData.HighScore; }
public void Load() { StartCoroutine(fader.FadeIn(fadeTime)); savingSystem.Load(DEFAULT_SAVE_FILE); }
public void Load() { savingSystem.Load(fileName); }
public void Load() { _ss.Load(DefaultSaveFile); }