Merge remote-tracking branch 'origin/dev_ani3' into dev_cyp
This commit is contained in:
commit
475250e795
7 files changed
+44
-45
No files matched your search
@@ -870,10 +870,14 @@ public class RowerHomeScript : PFUIPanel
|
||||
{
|
||||
try
|
||||
{
|
||||
var files = Directory.GetFiles(PFConstants.RowerRecordCacheFolder);
|
||||
if (files.Length > 0)
|
||||
var dir = $"{PFConstants.RowerRecordCacheFolder}/{App.CurrentUser.Id}/";
|
||||
var hasLocalData = Directory.Exists(dir);
|
||||
if (hasLocalData)
|
||||
{
|
||||
UIManager.ShowConfirm(App.GetLocalString("Warn"), App.GetLocalString("continue a game?"), () =>
|
||||
var files = Directory.GetFiles(dir);
|
||||
if (files.Length == 0)
|
||||
return;
|
||||
UIManager.ShowConfirm(App.GetLocalString("Warning"), App.GetLocalString("Continue the game?"), () =>
|
||||
{
|
||||
var str = File.ReadAllText(files[0]);
|
||||
var list = str.Replace("\r\n", " ").Split(' ');
|
||||
@@ -925,7 +929,12 @@ public class RowerHomeScript : PFUIPanel
|
||||
{
|
||||
try
|
||||
{
|
||||
var path = $"{PFConstants.RowerRecordCacheFolder}/{Id}.txt";
|
||||
var dir = $"{PFConstants.RowerRecordCacheFolder}/{App.CurrentUser.Id}/";
|
||||
var path = $"{dir}/{Id}.txt";
|
||||
if (!Directory.Exists(dir))
|
||||
{
|
||||
Directory.CreateDirectory(dir);
|
||||
}
|
||||
File.WriteAllText(path, string.Join("\r\n", records));
|
||||
PlayerPrefs.SetString("historyRowerType", $"{rowerType.type},{rowerType.value}");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user