fix:1、添加arrow的游戏代码,和相关的周边功能
This commit is contained in:
@@ -66,6 +66,9 @@ namespace RedHotRoast
|
||||
public static uint liveVideoLoaded = ++Cursor_BASE;
|
||||
|
||||
public static uint sendLog = ++Cursor_BASE;
|
||||
public static uint ThemeChange = ++Cursor_BASE;
|
||||
public static uint UpdateSpeed = ++Cursor_BASE;
|
||||
public static uint UseProps = ++Cursor_BASE;
|
||||
public static uint StopArrowTouch = ++Cursor_BASE;
|
||||
|
||||
public static uint refreshGift = ++Cursor_BASE;
|
||||
|
||||
@@ -168,9 +168,14 @@ namespace RedHotRoast
|
||||
public static uint RedeemCodeUI_Open = ++cursor_OpenClose;
|
||||
public static uint RedeemCodeUI_Close = ++cursor_OpenClose;
|
||||
|
||||
public static uint ArrowTipsUI_Open = ++cursor_OpenClose;
|
||||
public static uint ArrowTipsUI_Close = ++cursor_OpenClose;
|
||||
|
||||
public static uint MakeupConfirmUI_Close = ++cursor_OpenClose;
|
||||
public static uint MakeupConfirmUI_Open = ++cursor_OpenClose;
|
||||
public static uint SaveingPotUI_Open = ++cursor_OpenClose;
|
||||
public static uint SaveingPotUI_Close = ++cursor_OpenClose;
|
||||
public static uint ArrowSettingUI_Open = ++cursor_OpenClose;
|
||||
public static uint ArrowSettingUI_Close = ++cursor_OpenClose;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
using SGModule.ConfigLoader;
|
||||
|
||||
namespace IgnoreOPS
|
||||
{
|
||||
[ConfigKey("ArrowGameConfig")]
|
||||
public class ArrowGameConfig
|
||||
{
|
||||
public int id;
|
||||
public string levelName;
|
||||
public int gridRows;
|
||||
public int gridCols;
|
||||
public int pointSpacing;
|
||||
public string arrows;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0d0a4dc1573b454ba9ec50df8d7dea64
|
||||
timeCreated: 1783664763
|
||||
@@ -84,12 +84,20 @@ namespace RedHotRoast
|
||||
public int darkThoughProbability;
|
||||
public int Dailyrefreshtimes;
|
||||
|
||||
public int Smallrewardsrate;
|
||||
public int PiggyBankSwitch;
|
||||
public int ExpiryUnlock;
|
||||
public int BalanceExpired;
|
||||
|
||||
public int ExchangeModeToggle;
|
||||
public int ExchangeProcessMode;
|
||||
public int CHProcessMode;
|
||||
public int PiggyPropCD;
|
||||
public int SmallReward;
|
||||
public int ProcessingTime;
|
||||
public int WwalaccelerationCD;
|
||||
public int[] inlineInitNum;
|
||||
public int[] BalanceExchange;
|
||||
public int[] PotExchange;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,53 +1,57 @@
|
||||
using System.Linq;
|
||||
using SGModule.ConfigLoader;
|
||||
|
||||
namespace RedHotRoast {
|
||||
public class MakeupModel {
|
||||
public static Makeup GetData(int id) {
|
||||
return ConfigSystem.GetConfig<Makeup>().FirstOrDefault(makeup => makeup.id == id);
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigKey("makeup")]
|
||||
public class Makeup {
|
||||
public int id;
|
||||
public int item_need;
|
||||
public bool is_onetime;
|
||||
public int task_need;
|
||||
public int ad_need;
|
||||
public int item;
|
||||
public int levels_need;
|
||||
public int AD_Down;
|
||||
public int AD_Limit_times;
|
||||
public int Login_Limit_times;
|
||||
public int Active_time;
|
||||
public int Active_time_Down;
|
||||
public int Active_Limit_times;
|
||||
}
|
||||
|
||||
public class MakeupModel_2 {
|
||||
public static Makeup_2 GetData(int id) {
|
||||
return ConfigSystem.GetConfig<Makeup_2>().FirstOrDefault(makeup => makeup.id == id);
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigKey("makeup_2")]
|
||||
public class Makeup_2 {
|
||||
public int id;
|
||||
public int item_need;
|
||||
public bool is_onetime;
|
||||
public int task_need;
|
||||
public int ad_need;
|
||||
public int item;
|
||||
public int levels_need;
|
||||
public int AD_Down;
|
||||
public int AD_Limit_times;
|
||||
public int Login_Limit_times;
|
||||
public int Active_time;
|
||||
public int Active_time_Down;
|
||||
public int Active_Limit_times;
|
||||
public int Reset_time;
|
||||
public float ADIncrease;
|
||||
public int PayIncrease;
|
||||
}
|
||||
}
|
||||
using System.Linq;
|
||||
using SGModule.ConfigLoader;
|
||||
|
||||
namespace RedHotRoast {
|
||||
public class MakeupModel {
|
||||
public static Makeup GetData(int id) {
|
||||
return ConfigSystem.GetConfig<Makeup>().FirstOrDefault(makeup => makeup.id == id);
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigKey("makeup")]
|
||||
public class Makeup {
|
||||
public int id;
|
||||
public int item_need;
|
||||
public bool is_onetime;
|
||||
public int task_need;
|
||||
public int ad_need;
|
||||
public int item;
|
||||
public int levels_need;
|
||||
public int AD_Down;
|
||||
public int AD_Limit_times;
|
||||
public int Login_Limit_times;
|
||||
public int Active_time;
|
||||
public int Active_time_Down;
|
||||
public int Active_Limit_times;
|
||||
public string[] T_Redeemcode;
|
||||
public string T_ShopURL;
|
||||
}
|
||||
|
||||
public class MakeupModel_2 {
|
||||
public static Makeup_2 GetData(int id) {
|
||||
return ConfigSystem.GetConfig<Makeup_2>().FirstOrDefault(makeup => makeup.id == id);
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigKey("makeup_2")]
|
||||
public class Makeup_2 {
|
||||
public int id;
|
||||
public int item_need;
|
||||
public bool is_onetime;
|
||||
public int task_need;
|
||||
public int ad_need;
|
||||
public int item;
|
||||
public int levels_need;
|
||||
public int AD_Down;
|
||||
public int AD_Limit_times;
|
||||
public int Login_Limit_times;
|
||||
public int Active_time;
|
||||
public int Active_time_Down;
|
||||
public int Active_Limit_times;
|
||||
public int Reset_time;
|
||||
public float ADIncrease;
|
||||
public int PayIncrease;
|
||||
public string[] C_Redeemcode;
|
||||
public string C_ShopURL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ namespace FGUI.GameResult_08
|
||||
public partial class com_arrow_end_again : GComponent
|
||||
{
|
||||
public GTextField title;
|
||||
public GComponent btn_back;
|
||||
public GComponent btn_revive;
|
||||
public GButton btn_back;
|
||||
public GButton btn_revive;
|
||||
public GButton btn_restart;
|
||||
public const string URL = "ui://8sjqw0q3rsd42h";
|
||||
|
||||
@@ -23,8 +23,8 @@ namespace FGUI.GameResult_08
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
title = (GTextField)GetChildAt(2);
|
||||
btn_back = (GComponent)GetChildAt(3);
|
||||
btn_revive = (GComponent)GetChildAt(5);
|
||||
btn_back = (GButton)GetChildAt(3);
|
||||
btn_revive = (GButton)GetChildAt(5);
|
||||
btn_restart = (GButton)GetChildAt(6);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace FGUI.ZM_Common_01
|
||||
UIObjectFactory.SetPackageItemExtension(btn_head.URL, typeof(btn_head));
|
||||
UIObjectFactory.SetPackageItemExtension(btn_chat.URL, typeof(btn_chat));
|
||||
UIObjectFactory.SetPackageItemExtension(com_money.URL, typeof(com_money));
|
||||
UIObjectFactory.SetPackageItemExtension(com_open_tips.URL, typeof(com_open_tips));
|
||||
UIObjectFactory.SetPackageItemExtension(com_broadcast1.URL, typeof(com_broadcast1));
|
||||
UIObjectFactory.SetPackageItemExtension(com_broadcast_text1.URL, typeof(com_broadcast_text1));
|
||||
UIObjectFactory.SetPackageItemExtension(btn_curr.URL, typeof(btn_curr));
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace FGUI.ZM_Common_01
|
||||
public Controller can_buy;
|
||||
public GTextField btn_text;
|
||||
public GTextField watch;
|
||||
public GImage img_saveingpot;
|
||||
public const string URL = "ui://o9974uc5b7ax1h";
|
||||
|
||||
public static btn_watchAd CreateInstance()
|
||||
@@ -26,6 +27,7 @@ namespace FGUI.ZM_Common_01
|
||||
can_buy = GetControllerAt(1);
|
||||
btn_text = (GTextField)GetChildAt(2);
|
||||
watch = (GTextField)GetChildAt(3);
|
||||
img_saveingpot = (GImage)GetChildAt(6);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
|
||||
namespace FGUI.ZM_Common_01
|
||||
{
|
||||
public partial class com_open_tips : GComponent
|
||||
{
|
||||
public GTextField text_level_limit;
|
||||
public GGroup panel;
|
||||
public Transition t0;
|
||||
public const string URL = "ui://o9974uc5m39de3r";
|
||||
|
||||
public static com_open_tips CreateInstance()
|
||||
{
|
||||
return (com_open_tips)UIPackage.CreateObject("ZM_Common_01", "com_open_tips");
|
||||
}
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
text_level_limit = (GTextField)GetChildAt(2);
|
||||
panel = (GGroup)GetChildAt(3);
|
||||
t0 = GetTransitionAt(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 747634ef0d77cc849bf76ed0418b7347
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -7,9 +7,11 @@ namespace FGUI.ZM_Game_04
|
||||
{
|
||||
public partial class com_open : GComponent
|
||||
{
|
||||
public Controller state;
|
||||
public GTextField text_level;
|
||||
public GGraph tips_node;
|
||||
public GGraph tips_node1;
|
||||
public GComponent com_tips;
|
||||
public Transition t0;
|
||||
public const string URL = "ui://g3iqdlgcopwg13";
|
||||
|
||||
@@ -22,9 +24,11 @@ namespace FGUI.ZM_Game_04
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
state = GetControllerAt(0);
|
||||
text_level = (GTextField)GetChildAt(3);
|
||||
tips_node = (GGraph)GetChildAt(4);
|
||||
tips_node1 = (GGraph)GetChildAt(5);
|
||||
com_tips = (GComponent)GetChildAt(6);
|
||||
t0 = GetTransitionAt(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ namespace FGUI.ZM_Lobby_03
|
||||
UIObjectFactory.SetPackageItemExtension(btn_task_pass.URL, typeof(btn_task_pass));
|
||||
UIObjectFactory.SetPackageItemExtension(btn_egg.URL, typeof(btn_egg));
|
||||
UIObjectFactory.SetPackageItemExtension(com_first_award.URL, typeof(com_first_award));
|
||||
UIObjectFactory.SetPackageItemExtension(com_statement.URL, typeof(com_statement));
|
||||
UIObjectFactory.SetPackageItemExtension(btn_state.URL, typeof(btn_state));
|
||||
UIObjectFactory.SetPackageItemExtension(btn_item_play.URL, typeof(btn_item_play));
|
||||
UIObjectFactory.SetPackageItemExtension(com_hall.URL, typeof(com_hall));
|
||||
UIObjectFactory.SetPackageItemExtension(com_payloading.URL, typeof(com_payloading));
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
|
||||
namespace FGUI.ZM_Lobby_03
|
||||
{
|
||||
public partial class btn_state : GButton
|
||||
{
|
||||
public Controller state;
|
||||
public const string URL = "ui://gytj501clb7l2y";
|
||||
|
||||
public static btn_state CreateInstance()
|
||||
{
|
||||
return (btn_state)UIPackage.CreateObject("ZM_Lobby_03", "btn_state");
|
||||
}
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
state = GetControllerAt(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 925c8012230daca4c86440ae294f0b0e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,31 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
|
||||
namespace FGUI.ZM_Lobby_03
|
||||
{
|
||||
public partial class com_statement : GComponent
|
||||
{
|
||||
public GButton btn_back;
|
||||
public GList list;
|
||||
public btn_state state1;
|
||||
public btn_state state2;
|
||||
public const string URL = "ui://gytj501clb7l2x";
|
||||
|
||||
public static com_statement CreateInstance()
|
||||
{
|
||||
return (com_statement)UIPackage.CreateObject("ZM_Lobby_03", "com_statement");
|
||||
}
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
btn_back = (GButton)GetChildAt(0);
|
||||
list = (GList)GetChildAt(1);
|
||||
state1 = (btn_state)GetChildAt(2);
|
||||
state2 = (btn_state)GetChildAt(3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a49c6ece5881c347b78b8bb00141cf6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -10,6 +10,9 @@ namespace FGUI.ZM_Setting_07
|
||||
{
|
||||
UIObjectFactory.SetPackageItemExtension(com_language.URL, typeof(com_language));
|
||||
UIObjectFactory.SetPackageItemExtension(btn_language.URL, typeof(btn_language));
|
||||
UIObjectFactory.SetPackageItemExtension(com_arrow_setting.URL, typeof(com_arrow_setting));
|
||||
UIObjectFactory.SetPackageItemExtension(btn_menu1.URL, typeof(btn_menu1));
|
||||
UIObjectFactory.SetPackageItemExtension(btn_on_off.URL, typeof(btn_on_off));
|
||||
UIObjectFactory.SetPackageItemExtension(com_setting.URL, typeof(com_setting));
|
||||
UIObjectFactory.SetPackageItemExtension(btn_sound_on_off.URL, typeof(btn_sound_on_off));
|
||||
UIObjectFactory.SetPackageItemExtension(btn_menu.URL, typeof(btn_menu));
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
|
||||
namespace FGUI.ZM_Setting_07
|
||||
{
|
||||
public partial class btn_menu1 : GButton
|
||||
{
|
||||
public Controller menus;
|
||||
public const string URL = "ui://8rcjs2ucm39de43";
|
||||
|
||||
public static btn_menu1 CreateInstance()
|
||||
{
|
||||
return (btn_menu1)UIPackage.CreateObject("ZM_Setting_07", "btn_menu1");
|
||||
}
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
menus = GetControllerAt(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 573aaeddc4b426843959c3072306db0c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,25 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
|
||||
namespace FGUI.ZM_Setting_07
|
||||
{
|
||||
public partial class btn_on_off : GButton
|
||||
{
|
||||
public Controller on_off;
|
||||
public const string URL = "ui://8rcjs2ucm39de44";
|
||||
|
||||
public static btn_on_off CreateInstance()
|
||||
{
|
||||
return (btn_on_off)UIPackage.CreateObject("ZM_Setting_07", "btn_on_off");
|
||||
}
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
on_off = GetControllerAt(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 095c4ba293193084fb923dada6d91062
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,61 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
|
||||
namespace FGUI.ZM_Setting_07
|
||||
{
|
||||
public partial class com_arrow_setting : GComponent
|
||||
{
|
||||
public com_edit_name edit_name;
|
||||
public GList list;
|
||||
public GButton btn_close;
|
||||
public GTextField text_uid;
|
||||
public GTextField text_version;
|
||||
public GButton head;
|
||||
public btn_menu1 btn_official;
|
||||
public btn_menu1 btn_privacy;
|
||||
public btn_menu1 btn_terms;
|
||||
public btn_on_off btn_music;
|
||||
public btn_on_off btn_sound;
|
||||
public btn_menu1 btn_us;
|
||||
public btn_menu btn_restore;
|
||||
public GButton btn_revive;
|
||||
public GSlider speed_slide;
|
||||
public GTextField level_text;
|
||||
public GButton btn_player;
|
||||
public Transition show;
|
||||
public Transition hide;
|
||||
public const string URL = "ui://8rcjs2ucm39de42";
|
||||
|
||||
public static com_arrow_setting CreateInstance()
|
||||
{
|
||||
return (com_arrow_setting)UIPackage.CreateObject("ZM_Setting_07", "com_arrow_setting");
|
||||
}
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
edit_name = (com_edit_name)GetChildAt(4);
|
||||
list = (GList)GetChildAt(5);
|
||||
btn_close = (GButton)GetChildAt(6);
|
||||
text_uid = (GTextField)GetChildAt(7);
|
||||
text_version = (GTextField)GetChildAt(8);
|
||||
head = (GButton)GetChildAt(12);
|
||||
btn_official = (btn_menu1)GetChildAt(13);
|
||||
btn_privacy = (btn_menu1)GetChildAt(14);
|
||||
btn_terms = (btn_menu1)GetChildAt(15);
|
||||
btn_music = (btn_on_off)GetChildAt(16);
|
||||
btn_sound = (btn_on_off)GetChildAt(17);
|
||||
btn_us = (btn_menu1)GetChildAt(18);
|
||||
btn_restore = (btn_menu)GetChildAt(19);
|
||||
btn_revive = (GButton)GetChildAt(20);
|
||||
speed_slide = (GSlider)GetChildAt(21);
|
||||
level_text = (GTextField)GetChildAt(25);
|
||||
btn_player = (GButton)GetChildAt(26);
|
||||
show = GetTransitionAt(0);
|
||||
hide = GetTransitionAt(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf9d5020e6119e24ba1f670cf36dd988
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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