public void OnSwitchScene(bool isWarp) { if (isWarp) { TalePlayer.Save();//每次切场景存个档 } }
private void buttonLogin_Click(object sender, EventArgs e) { TalePlayer.Save(); TalePlayer.Oneloop(); //保证存档可以成功 Thread.Sleep(300); TalePlayer.Close(); MainForm.Instance.ChangePage(0); Close(); }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { if (viewStack1.SelectedIndex == 1) { UserProfile.Profile.OnLogout(); TalePlayer.Save(); TalePlayer.Oneloop(); //保证存档可以成功 Thread.Sleep(300); } }