fix:1、添加arrow的游戏代码,和相关的周边功能
This commit is contained in:
@@ -1,27 +1,30 @@
|
||||
|
||||
using SGModule.DataStorage;
|
||||
using SGModule.NetKit;
|
||||
using RedHotRoast;
|
||||
|
||||
public static partial class DataMgr {
|
||||
public static void InitPreferences(string jsonStr) {
|
||||
DataManager.Instance.AddSaveCallback(CloudDataSaver.UpdateData);
|
||||
var loginModel = LoginKit.Instance.LoginModel;
|
||||
|
||||
// Debug.Log($"barry init Preferences-----0--{loginModel.uid}--{userID}");
|
||||
if (loginModel.NewPlayer || loginModel.Uid != UserID.Value) {
|
||||
// Debug.Log($"barry init Preferences----1---");
|
||||
|
||||
DataManager.Instance.ClearAllData();
|
||||
UserID.Value = loginModel.Uid;
|
||||
}
|
||||
|
||||
// ObjectExtensionsTest.AsTestRun();
|
||||
|
||||
// Debug.Log($"barry init Preferences----2---{jsomnStr}");
|
||||
DataManager.Instance.ImportFromJson(jsonStr, loginModel.PlayDataVer);
|
||||
|
||||
// UserCoreMgr.Instance.LoadItemData();
|
||||
// ItemManager.GetInstance.LoadItemData();
|
||||
}
|
||||
}
|
||||
|
||||
using SGModule.DataStorage;
|
||||
using SGModule.NetKit;
|
||||
using RedHotRoast;
|
||||
|
||||
public static partial class DataMgr {
|
||||
public static void InitPreferences(string jsonStr) {
|
||||
DataManager.Instance.AddSaveCallback(CloudDataSaver.UpdateData);
|
||||
var loginModel = LoginKit.Instance.LoginModel;
|
||||
|
||||
// Debug.Log($"barry init Preferences-----0--{loginModel.uid}--{userID}");
|
||||
if (loginModel.NewPlayer || loginModel.Uid != UserID.Value) {
|
||||
// Debug.Log($"barry init Preferences----1---");
|
||||
|
||||
DataManager.Instance.ClearAllData();
|
||||
UserID.Value = loginModel.Uid;
|
||||
GameHelper.InitNewWatchCDList(true);
|
||||
|
||||
}
|
||||
GameHelper.InitNewWatchCDList();
|
||||
|
||||
// ObjectExtensionsTest.AsTestRun();
|
||||
|
||||
// Debug.Log($"barry init Preferences----2---{jsomnStr}");
|
||||
DataManager.Instance.ImportFromJson(jsonStr, loginModel.PlayDataVer);
|
||||
|
||||
// UserCoreMgr.Instance.LoadItemData();
|
||||
// ItemManager.GetInstance.LoadItemData();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,6 +194,7 @@
|
||||
fx_secret_girl,
|
||||
fx_proplight,
|
||||
fx_btnchat,
|
||||
fx_saving,
|
||||
fx_chatunlock,
|
||||
fx_chatunlock1,
|
||||
fx_chatunlock2,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using DontConfuse;
|
||||
using Newtonsoft.Json;
|
||||
using SGModule.NetKit;
|
||||
|
||||
namespace RedHotRoast
|
||||
@@ -26,7 +27,7 @@ namespace RedHotRoast
|
||||
private ConsumeSystem consumeSys;
|
||||
|
||||
private bool isFirstEnter = true;
|
||||
public int enterHallTimes = 0;
|
||||
public int openTipsTimes = 0;
|
||||
public event Action UpdateEvent;
|
||||
|
||||
// public int countTimes = 0;
|
||||
@@ -150,13 +151,19 @@ namespace RedHotRoast
|
||||
enterGame = (bool)obj;
|
||||
}
|
||||
|
||||
enterHallTimes++;
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PlayUI_Close);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RewardAniUI_Close);
|
||||
AudioManager.Instance.StopBGM();
|
||||
AudioManager.Instance.PlayBGM(AudioConst.MainBg);
|
||||
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Open, enterGame);
|
||||
if (GameHelper.IsGiftSwitch())
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ArrowGameUI_Open);
|
||||
}
|
||||
else
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Open, enterGame);
|
||||
}
|
||||
|
||||
GameHelper.PlayGameTimeEvent(1);
|
||||
MemoryManager.CleanMemoryMonitor();
|
||||
@@ -165,13 +172,15 @@ namespace RedHotRoast
|
||||
|
||||
private void EnterGame(object obj)
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainTabUI_Close);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Close);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RainPlayUI_Open);
|
||||
AudioManager.Instance.StopBGM();
|
||||
|
||||
AudioManager.Instance.PlayBGM(AudioConst.GameBg);
|
||||
if (!GameHelper.IsGiftSwitch())
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainTabUI_Close);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Close);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RainPlayUI_Open);
|
||||
AudioManager.Instance.StopBGM();
|
||||
|
||||
AudioManager.Instance.PlayBGM(AudioConst.GameBg);
|
||||
}
|
||||
}
|
||||
|
||||
#region 缓存资源
|
||||
@@ -222,4 +231,12 @@ namespace RedHotRoast
|
||||
this.isInH5 = isInH5;
|
||||
}
|
||||
}
|
||||
|
||||
public class SDKOpenConfig
|
||||
{
|
||||
[JsonProperty("normal")]
|
||||
public bool normal;
|
||||
[JsonProperty("url")]
|
||||
public string url;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user