fix:1、添加arrow的游戏代码,和相关的周边功能
This commit is contained in:
@@ -1223,8 +1223,38 @@ namespace RedHotRoast
|
||||
if (!isGet && IsGiftSwitch())
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.FirstRewardUI_Open);
|
||||
|
||||
//小额发放
|
||||
IsShowPettyReward();
|
||||
}
|
||||
}
|
||||
|
||||
private static int ShowStatementViewCount = 0;
|
||||
public static void ShowStatementView()
|
||||
{
|
||||
if (ShowStatementViewCount > 0) return;
|
||||
if (!IsGiftSwitch()) return;
|
||||
|
||||
ShowStatementViewCount++;
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.StatementViewUI_Open);
|
||||
}
|
||||
public static void IsShowPettyReward()
|
||||
{
|
||||
if (!IsGiftSwitch()) return;
|
||||
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PettyAwardUI_Open);
|
||||
}
|
||||
|
||||
public static bool IsShowOpenGameUI()
|
||||
{
|
||||
var vo = ConfigSystem.GetConfig<Makeup>();
|
||||
|
||||
if (GetLevel() > vo[^1].levels_need)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static Dictionary<string, string> adCallbackInfo = new Dictionary<string, string>();
|
||||
|
||||
@@ -1806,6 +1836,82 @@ namespace RedHotRoast
|
||||
}
|
||||
return event_;
|
||||
}
|
||||
|
||||
public static void CopyText(string text)
|
||||
{
|
||||
#if UNITY_EDITOR_WIN || UNITY_EDITOR_OSX || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_STANDALONE_LINUX
|
||||
GUIUtility.systemCopyBuffer = text;
|
||||
#elif UNITY_ANDROID
|
||||
// CopyToClipboardAndroid(text);
|
||||
|
||||
GUIUtility.systemCopyBuffer = text;
|
||||
#elif UNITY_IOS
|
||||
// BrigdeIOS.copyText(text);
|
||||
GUIUtility.systemCopyBuffer = text;
|
||||
#else
|
||||
Debug.LogWarning("当前平台不支持复制到剪贴板功能");
|
||||
#endif
|
||||
GameHelper.ShowTips("Copy Succeed");
|
||||
}
|
||||
|
||||
public static string GetPriceInt(decimal ch)
|
||||
{
|
||||
return $"${ch:N0}";
|
||||
}
|
||||
|
||||
public static void InitNewWatchCDList(bool isNew = false)
|
||||
{
|
||||
if (isNew)
|
||||
{
|
||||
DataMgr.NewWatchCd.Value.Clear();
|
||||
}
|
||||
|
||||
if (DataMgr.NewWatchCd.Value.Count == 0)
|
||||
{
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
DataMgr.NewWatchCd.Value.Add(0);
|
||||
}
|
||||
|
||||
DataMgr.NewWatchCd.Save();
|
||||
}
|
||||
}
|
||||
public static void SetWatchCd(int type)
|
||||
{
|
||||
var watchCd = ConfigSystem.GetCommonConf().PiggyPropCD;
|
||||
|
||||
if (type > 0 && DataMgr.NewWatchCd.Value.Count > 0)
|
||||
{
|
||||
DataMgr.NewWatchCd.Value[type] = (int)GetNowTime() + watchCd;
|
||||
DataMgr.NewWatchCd.Save();
|
||||
}
|
||||
}
|
||||
|
||||
public static string GenerateUniqueKey(Makeup vo, int index)
|
||||
{
|
||||
// 处理数组为空的边界情况
|
||||
if (vo.T_Redeemcode == null || vo.T_Redeemcode.Length == 0)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
// 如果 index 超出范围,取最后一个元素;否则直接返回对应索引的元素
|
||||
int validIndex = index >= 0 && index < vo.T_Redeemcode.Length ? index : vo.T_Redeemcode.Length - 1;
|
||||
return vo.T_Redeemcode[validIndex];
|
||||
}
|
||||
|
||||
public static string GenerateUniqueKey1(Makeup_2 vo, int index)
|
||||
{
|
||||
// 处理数组为空的边界情况
|
||||
if (vo.C_Redeemcode == null || vo.C_Redeemcode.Length == 0)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
// 如果 index 超出范围,取最后一个元素;否则直接返回对应索引的元素
|
||||
int validIndex = index >= 0 && index < vo.C_Redeemcode.Length ? index : vo.C_Redeemcode.Length - 1;
|
||||
return vo.C_Redeemcode[validIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user