Commit ac5bbdf7 authored by Unicorn369's avatar Unicorn369

Save Config

parent b1d1b754
......@@ -739,6 +739,7 @@ public class Ocgcore : ServantWithCardDescription
public void onHome()
{
Program.I().SaveConfig();
returnTo();
}
......
......@@ -1202,8 +1202,7 @@ public class Program : MonoBehaviour
void OnApplicationQuit()
{
TcpHelper.SaveRecord();
cardDescription.save();
setting.saveWhenQuit();
SaveConfig();
for (int i = 0; i < servants.Count; i++)
{
servants[i].OnQuit();
......@@ -1225,6 +1224,13 @@ public class Program : MonoBehaviour
OnApplicationQuit();
}
public void SaveConfig()
{
cardDescription.save();
setting.save();
setting.saveWhenQuit();
}
#endregion
//递归创建目录
......
......@@ -215,6 +215,7 @@ public class Setting : WindowServant2D
void onClickExit()
{
Program.I().SaveConfig();
hide();
}
......
......@@ -318,6 +318,7 @@ public class DeckManager : ServantWithCardDescription
{
returnAction();
}
Program.I().SaveConfig();
}
void sort()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment