fix:1、更换项目,使用winter来创建
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using FlowerPower;
|
||||
using LoveLegend;
|
||||
using UnityEngine;
|
||||
|
||||
public class SaveingPotClass
|
||||
@@ -48,9 +48,6 @@ public class SaveingPotClass
|
||||
public long clear_time;
|
||||
public long start_time;
|
||||
public bool auto_show = false;
|
||||
public List<SaveingPotRdData> rdData;
|
||||
public SaveingPotRdData lastRdData;
|
||||
|
||||
public void SetStatus(SaveingPotTaskStatus _status)
|
||||
{
|
||||
status = _status;
|
||||
@@ -64,7 +61,7 @@ public class SaveingPotClass
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
return $"{amount:N}";
|
||||
return GameHelper.ChooseCurrency() + $"{amount:N}";
|
||||
//}
|
||||
}
|
||||
|
||||
@@ -75,24 +72,15 @@ public enum SaveingPotTaskStatus
|
||||
None,
|
||||
Task,
|
||||
Inline,
|
||||
ticket,
|
||||
code,
|
||||
}
|
||||
public class SaveingPotRdData
|
||||
{
|
||||
public int coupon_mount;
|
||||
public string code;
|
||||
public bool isClaimed;
|
||||
}
|
||||
|
||||
// var makeupTaskData = new MakeupTaskData();
|
||||
// makeupTaskData.tableId = makeupVo.id;
|
||||
// makeupTaskData.id = PreferencesMgr.Instance.MakeupTaskHistory.Count + 1;
|
||||
// makeupTaskData.id = DataMgr.MakeupTaskHistory.Value.Count + 1;
|
||||
// makeupTaskData.amountStr = $"{GameHelper.Get102Str(makeupVo.item_need)}";
|
||||
// makeupTaskData.amount = makeupVo.item_need;
|
||||
// makeupTaskData.orderID = GameHelper.GetRandomNum(8);
|
||||
|
||||
// PreferencesMgr.Instance.MakeupTaskHistory.Add(makeupTaskData);
|
||||
// DataMgr.MakeupTaskHistory.Value.Add(makeupTaskData);
|
||||
// Debug.Log("uuuuuuuuuuuuuuuuuuuu");
|
||||
// makeupTaskData.SetStatus(MakeupTaskStatus.None);
|
||||
public class SaveingPotHelper
|
||||
@@ -100,8 +88,8 @@ public class SaveingPotHelper
|
||||
|
||||
public static void CheckSaveingPot()
|
||||
{
|
||||
Debug.Log(SaveData.GetSaveobject());
|
||||
if (SaveData.GetSaveobject().saveingpot_history == null || SaveData.GetSaveobject().saveingpot_history.Count == 0)
|
||||
Debug.Log(SaveData.GetSaveObject());
|
||||
if (SaveData.GetSaveObject().saveingpot_history == null || SaveData.GetSaveObject().saveingpot_history.Count == 0)
|
||||
{
|
||||
CreatSaveingPotItem();
|
||||
}
|
||||
@@ -110,39 +98,39 @@ public class SaveingPotHelper
|
||||
|
||||
public static void CreatSaveingPotItem()
|
||||
{
|
||||
if (SaveData.GetSaveobject().saveingpot_history.Count >= 3)
|
||||
if (SaveData.GetSaveObject().saveingpot_history.Count >= 3)
|
||||
{
|
||||
SaveData.saveDataFunc();
|
||||
SaveData.SaveDataFunc();
|
||||
return;
|
||||
}
|
||||
int index = SaveData.GetSaveobject().saveingpot_history.Count;
|
||||
if (index >= ConfigSystem.GetConfig<MakeupModel_2>().dataList.Count) index = ConfigSystem.GetConfig<MakeupModel_2>().dataList.Count - 1;
|
||||
Makeup_2 config = ConfigSystem.GetConfig<MakeupModel_2>().dataList[index];
|
||||
int index = SaveData.GetSaveObject().saveingpot_history.Count;
|
||||
if (index >= ConfigSystem.GetConfig<Makeup_2>().Count) index = ConfigSystem.GetConfig<Makeup_2>().Count - 1;
|
||||
Makeup_2 config = ConfigSystem.GetConfig<Makeup_2>()[index];
|
||||
SaveingPotClass saveingpot = new SaveingPotClass();
|
||||
saveingpot.tableId = config.id;
|
||||
saveingpot.id = SaveData.GetSaveobject().saveingpot_history.Count + 1;
|
||||
saveingpot.amountStr = $"${config.item_need:N}";
|
||||
saveingpot.id = SaveData.GetSaveObject().saveingpot_history.Count + 1;
|
||||
saveingpot.amountStr = GameHelper.ChooseCurrency() + $"{config.item_need:N}";
|
||||
saveingpot.amount = config.item_need;
|
||||
saveingpot.orderID = GameHelper.GetRandomNum(8);
|
||||
saveingpot.SetStatus(SaveingPotTaskStatus.None);
|
||||
saveingpot.clear_time = GameHelper.GetNowTime() + config.Reset_time * 3600;
|
||||
saveingpot.start_time = GameHelper.GetNowTime();
|
||||
|
||||
SaveData.GetSaveobject().saveingpot_history.Add(saveingpot);
|
||||
SaveData.saveDataFunc();
|
||||
SaveData.GetSaveObject().saveingpot_history.Add(saveingpot);
|
||||
SaveData.SaveDataFunc();
|
||||
Debug.Log("zengjaichenggong");
|
||||
}
|
||||
|
||||
public static bool TestingClearTime()
|
||||
{
|
||||
if (SaveData.GetSaveobject().saveingpot_history[SaveData.GetSaveobject().saveingpot_history.Count - 1].clear_time < GameHelper.GetNowTime() && SaveData.GetSaveobject().saveingpot_history[SaveData.GetSaveobject().saveingpot_history.Count - 1].needShowAni)
|
||||
if (SaveData.GetSaveObject().saveingpot_history[SaveData.GetSaveObject().saveingpot_history.Count - 1].clear_time < GameHelper.GetNowTime() && SaveData.GetSaveObject().saveingpot_history[SaveData.GetSaveObject().saveingpot_history.Count - 1].needShowAni)
|
||||
{
|
||||
Debug.Log("qinglisaveingpot");
|
||||
int index = SaveData.GetSaveobject().saveingpot_history.Count - 1;
|
||||
Makeup_2 config = ConfigSystem.GetConfig<MakeupModel_2>().dataList[index];
|
||||
SaveData.GetSaveobject().saveingpot_ch = 0;
|
||||
SaveData.GetSaveobject().saveingpot_history[SaveData.GetSaveobject().saveingpot_history.Count - 1].clear_time = GameHelper.GetNowTime() + config.Reset_time * 3600;
|
||||
SaveData.GetSaveobject().saveingpot_history[SaveData.GetSaveobject().saveingpot_history.Count - 1].auto_show = false;
|
||||
int index = SaveData.GetSaveObject().saveingpot_history.Count - 1;
|
||||
Makeup_2 config = ConfigSystem.GetConfig<Makeup_2>()[index];
|
||||
SaveData.GetSaveObject().saveingpot_ch = 0;
|
||||
SaveData.GetSaveObject().saveingpot_history[SaveData.GetSaveObject().saveingpot_history.Count - 1].clear_time = GameHelper.GetNowTime() + config.Reset_time * 3600;
|
||||
SaveData.GetSaveObject().saveingpot_history[SaveData.GetSaveObject().saveingpot_history.Count - 1].auto_show = false;
|
||||
|
||||
return true;
|
||||
|
||||
@@ -151,18 +139,18 @@ public class SaveingPotHelper
|
||||
}
|
||||
public static void ResetHistory()
|
||||
{
|
||||
for (int i = 0; i < SaveData.GetSaveobject().saveingpot_history.Count; i++)
|
||||
for (int i = 0; i < SaveData.GetSaveObject().saveingpot_history.Count; i++)
|
||||
{
|
||||
SaveingPotClass saveingpot = SaveData.GetSaveobject().saveingpot_history[i];
|
||||
Makeup_2 config = ConfigSystem.GetConfig<MakeupModel_2>().dataList[i];
|
||||
SaveingPotClass saveingpot = SaveData.GetSaveObject().saveingpot_history[i];
|
||||
Makeup_2 config = ConfigSystem.GetConfig<Makeup_2>()[i];
|
||||
saveingpot.amount = config.item_need;
|
||||
saveingpot.amountStr = $"${config.item_need:N}";
|
||||
saveingpot.amountStr = GameHelper.ChooseCurrency() + $"{config.item_need:N}";
|
||||
if (saveingpot.start_time + config.Reset_time * 3600 - saveingpot.clear_time > 100)
|
||||
{
|
||||
saveingpot.clear_time = saveingpot.start_time + config.Reset_time * 3600;
|
||||
}
|
||||
}
|
||||
SaveData.saveDataFunc();
|
||||
SaveData.SaveDataFunc();
|
||||
|
||||
}
|
||||
|
||||
@@ -170,7 +158,7 @@ public class SaveingPotHelper
|
||||
|
||||
public static string getChString(float ch)
|
||||
{
|
||||
return $"${ch:N}";
|
||||
return GameHelper.ChooseCurrency()+$"{ch:N}";
|
||||
}
|
||||
public static string getChNumber(float ch)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user