fix:1、添加arrow的游戏代码,和相关的周边功能

This commit is contained in:
2026-07-10 17:57:02 +08:00
parent dd56ccb469
commit f1e05d9547
145 changed files with 8492 additions and 1059 deletions
@@ -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;
}
}
@@ -23,6 +23,8 @@ namespace RedHotRoast {
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 {
@@ -49,5 +51,7 @@ namespace RedHotRoast {
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);
}
}
}
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5bda89c1f110f504d9e35769149d5994
guid: 747634ef0d77cc849bf76ed0418b7347
MonoImporter:
externalObjects: {}
serializedVersion: 2
@@ -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);
}
}
}
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 51a8455058a9919499be346dc1bfadb7
guid: 925c8012230daca4c86440ae294f0b0e
MonoImporter:
externalObjects: {}
serializedVersion: 2
@@ -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);
}
}
}
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8d20c295f8867f54c837180dda6371e4
guid: 6a49c6ece5881c347b78b8bb00141cf6
MonoImporter:
externalObjects: {}
serializedVersion: 2
@@ -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);
}
}
}
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5f8ad5a85bdfdab4cbe1c45ffb2ed34a
guid: 573aaeddc4b426843959c3072306db0c
MonoImporter:
externalObjects: {}
serializedVersion: 2
@@ -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:
+106
View File
@@ -1223,9 +1223,39 @@ 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>();
// public static void SendRevenueToAF(string purch_number)
@@ -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];
}
}
}
+3
View File
@@ -14,7 +14,10 @@ public static partial class DataMgr {
DataManager.Instance.ClearAllData();
UserID.Value = loginModel.Uid;
GameHelper.InitNewWatchCDList(true);
}
GameHelper.InitNewWatchCDList();
// ObjectExtensionsTest.AsTestRun();
+1
View File
@@ -194,6 +194,7 @@
fx_secret_girl,
fx_proplight,
fx_btnchat,
fx_saving,
fx_chatunlock,
fx_chatunlock1,
fx_chatunlock2,
+20 -3
View File
@@ -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);
if (GameHelper.IsGiftSwitch())
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ArrowGameUI_Open);
}
else
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Open, enterGame);
}
GameHelper.PlayGameTimeEvent(1);
MemoryManager.CleanMemoryMonitor();
@@ -164,6 +171,8 @@ namespace RedHotRoast
private void EnterGame(object obj)
{
if (!GameHelper.IsGiftSwitch())
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainTabUI_Close);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Close);
@@ -171,7 +180,7 @@ namespace RedHotRoast
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;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB

After

Width:  |  Height:  |  Size: 490 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 199 KiB

+59 -1
View File
@@ -744,8 +744,9 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 292594112}
- component: {fileID: 292594113}
m_Layer: 0
m_Name: GameObject
m_Name: LevelManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -766,6 +767,18 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &292594113
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 292594110}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3649ac68929b4b359b8019a52bcc8feb, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &338080400
GameObject:
m_ObjectHideFlags: 0
@@ -2242,6 +2255,50 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &1969760103
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1969760105}
- component: {fileID: 1969760104}
m_Layer: 0
m_Name: InputHelper
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1969760104
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1969760103}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0bd9077b8ef54fc38cf318e5d8a518d7, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1969760105
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1969760103}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -14.006069, y: -23.372356, z: -0.64489496}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2076036131
GameObject:
m_ObjectHideFlags: 0
@@ -2433,3 +2490,4 @@ SceneRoots:
- {fileID: 29401442}
- {fileID: 292594112}
- {fileID: 1659410219}
- {fileID: 1969760105}
+9
View File
@@ -65,6 +65,10 @@ public class AdExchangeManager
// }
// };
public const string MakeupAd = "MakeupAd";
public const string SavingPotMakeupAd = "SavingPotMakeupAd";
public const string MakeupLVAd = "MakeupLVAd";
public void Exchange(AdExchangeData _data)
{
if (Time.time - SaveData.rm_time < 5)
@@ -220,6 +224,11 @@ public class AdExchangeManager
{
needAds = (int)Math.Ceiling(getCoinNeedAds(name));
}
else if (name == MakeupAd || name == SavingPotMakeupAd || name == MakeupLVAd)
{
needAds = 9999;
}
return needAds;
+11
View File
@@ -74,4 +74,15 @@ public static class DataKeys
public const string ExchangeModeToggle = "ExchangeModeToggle";
public const string ExchangeProcessMode = "ExchangeProcessMode";
public const string CHProcessMode = "CHProcessMode";
public const string NewWatchCd = "NewWatchCd";
public const string PettyState = "PettyState";
public const string PettyAccount = "PettyAccount";
public const string PettyFirstName = "PettyFirstName";
public const string PettyLastName = "PettyLastName";
public const string PettyOrderID = "PettyOrderID";
public const string PettyDateTime = "PettyDateTime";
public const string PettyAmount = "PettyAmount";
public const string PettyDataLimit = "PettyDataLimit";
}
+12 -2
View File
@@ -87,8 +87,17 @@ public static partial class DataMgr
public static DataStorage<int> ArrowDarkTheme = BindDataStorage<int>(DataKeys.ArrowDarkTheme,@default: 1);
public static DataStorage<int> ArrowTheme = BindDataStorage<int>(DataKeys.ArrowTheme,@default: 0);
public static DataStorage<int> ExchangeModeToggle = BindDataStorage<int>(DataKeys.ExchangeModeToggle,@default: 1);
public static DataStorage<int> ExchangeProcessMode = BindDataStorage<int>(DataKeys.ExchangeModeToggle,@default: 1);
public static DataStorage<int> CHProcessMode = BindDataStorage<int>(DataKeys.ExchangeModeToggle,@default: 1);
public static DataStorage<int> ExchangeProcessMode = BindDataStorage<int>(DataKeys.ExchangeProcessMode,@default: 1);
public static DataStorage<int> CHProcessMode = BindDataStorage<int>(DataKeys.CHProcessMode,@default: 1);
public static DataStorage<int> PettyState = BindDataStorage<int>(DataKeys.PettyState,@default: 0);
public static DataStorage<string> PettyAccount = BindDataStorage<string>(DataKeys.PettyAccount,@default: "");
public static DataStorage<string> PettyFirstName = BindDataStorage<string>(DataKeys.PettyFirstName,@default: "");
public static DataStorage<string> PettyLastName = BindDataStorage<string>(DataKeys.PettyLastName,@default: "");
public static DataStorage<string> PettyOrderID = BindDataStorage<string>(DataKeys.PettyOrderID,@default: "");
public static DataStorage<string> PettyDateTime = BindDataStorage<string>(DataKeys.PettyDateTime,@default: "");
public static DataStorage<int> PettyAmount = BindDataStorage<int>(DataKeys.PettyAmount);
public static DataStorage<int> PettyDataLimit = BindDataStorage<int>(DataKeys.PettyDataLimit);
#endregion
@@ -115,6 +124,7 @@ public static partial class DataMgr
public static DataStorage<int> LevelUnlockSpecial = new(DataKeys.LevelUnlockListSpecial, defaultValue: -1);
public static DataStorage<int> LevelUnlockVIP = new(DataKeys.LevelUnlockListVIP, defaultValue: -1);
public static DataStorage<List<Levelunlock>> LevelUnlockListNew = new(DataKeys.LevelUnlockListNew, defaultValue: new List<Levelunlock>());
public static DataStorage<List<int>> NewWatchCd = new(DataKeys.NewWatchCd,defaultValue: new List<int>(),cloudSave: false);
#endregion
}
@@ -8,5 +8,7 @@ namespace RedHotRoast
public static readonly uint Login_Succeed = ++Cursor_BASE;
public static readonly uint Game_StartReady = ++Cursor_BASE;
public static readonly uint Game_Start = ++Cursor_BASE;
public static readonly uint open_wb = ++Cursor_BASE;
}
}
+21
View File
@@ -0,0 +1,21 @@
using UnityEngine;
public class InputHelper : MonoBehaviour
{
public static InputHelper Instance;
private void Awake()
{
if (Instance == null) Instance = this;
else Destroy(gameObject);
}
// 提供输入状态给UI层调用
public int TouchCount => Input.touchCount;
public Touch GetTouch(int index) => Input.GetTouch(index);
public bool GetMouseButtonDown(int button) => Input.GetMouseButtonDown(button);
public bool GetMouseButton(int button) => Input.GetMouseButton(button);
public bool GetMouseButtonUp(int button) => Input.GetMouseButtonUp(button);
public Vector3 MousePosition => Input.mousePosition;
// public float GetMouseWheelDelta() => Input.GetMouseWheelDelta();
}
+3
View File
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 0bd9077b8ef54fc38cf318e5d8a518d7
timeCreated: 1783664074
+103
View File
@@ -0,0 +1,103 @@
using UnityEngine;
using System.Collections.Generic;
using IgnoreOPS;
using RedHotRoast;
public class LevelManager : MonoBehaviour
{
// 单例实例
public static LevelManager Instance { get; private set; }
// 当前加载的关卡配置
public LevelConfig CurrentLevel { get; private set; }
// 关卡文件在 Resources 下的路径前缀
private const string LevelResourcePath = "Levels/lv";
private void Awake()
{
// 单例初始化:保证全局只有一个实例
if (Instance != null && Instance != this)
{
Destroy(gameObject);
return;
}
Instance = this;
// 可选:跨场景不销毁
// DontDestroyOnLoad(gameObject);
}
private void OnDestroy()
{
// 销毁时清空单例引用,防止内存泄漏
if (Instance == this)
{
Instance = null;
}
}
/// <summary>
/// 按关卡ID加载单个关卡配置
/// </summary>
/// <param name="levelId">关卡ID</param>
/// <returns>加载成功返回true</returns>
public bool LoadLevel(int levelId)
{
levelId -= 1;
if (levelId < 0)
{
Debug.LogError("关卡ID必须大于0");
return false;
}
var gameConfigs = ConfigSystem.GetConfig<ArrowGameConfig>();
if (levelId >= gameConfigs.Count)
{
levelId = gameConfigs.Count - 1;
}
var jsonFile = gameConfigs[levelId];
if (jsonFile == null)
{
Debug.LogError($"关卡文件加载失败:{LevelResourcePath}{levelId}");
return false;
}
var curlevelConfig = new LevelConfig()
{
levelId = jsonFile.id,
levelName = jsonFile.levelName,
gridRows = jsonFile.gridRows,
gridCols = jsonFile.gridCols,
pointSpacing = jsonFile.pointSpacing,
arrows = SerializeUtil.ToObject<List<ArrowConfig>>(jsonFile.arrows)
};
CurrentLevel = curlevelConfig;
if (CurrentLevel == null || CurrentLevel.arrows == null)
{
Debug.LogError($"关卡 {levelId} 配置解析失败");
return false;
}
Debug.Log($"关卡 {levelId} 加载成功:{CurrentLevel.levelName},箭头数:{CurrentLevel.arrows.Count}");
return true;
}
/// <summary>
/// 按完整文件名加载关卡(不含.json后缀)
/// </summary>
public bool LoadLevelByName(string fileName)
{
TextAsset jsonFile = Resources.Load<TextAsset>(fileName);
if (jsonFile == null)
{
Debug.LogError($"关卡文件加载失败:{fileName}");
return false;
}
CurrentLevel = JsonUtility.FromJson<LevelConfig>(jsonFile.text);
return CurrentLevel != null;
}
}
+3
View File
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 3649ac68929b4b359b8019a52bcc8feb
timeCreated: 1783664702
+3 -2
View File
@@ -10,8 +10,9 @@ public class LoveLegendRoot : MonoBehaviour
{
public void Awake()
{
#if !UNITY_EDITOR || GAME_RELEASE
GameObject.Find("IngameDebugConsole").SetActive(false);
#if UNITY_EDITOR || GAME_RELEASE || GAME_RELEASE1
GameObject ingameDebugConsole = GameObject.Find("IngameDebugConsole");
if (ingameDebugConsole != null) ingameDebugConsole.SetActive(false);
#endif
MaxADKit.Init();
// SGModule.Net.NetworkKit.Instance.InitData(NetworkManager.identifier,true);
@@ -76,5 +76,13 @@ namespace RedHotRoast
public const string UnlockLevelNewCtrl = "UnlockLevelNewCtrl";
public const string BroadcastCtrl = "BroadcastCtrl";
public const string EggViewCtrl = "EggViewCtrl";
public const string ArrowGameCtrl = "ArrowGameCtrl";
public const string ArrowThemeCtrl = "ArrowThemeCtrl";
public const string ArrowTipsCtrl = "ArrowTipsCtrl";
public const string StatementViewCtrl = "StatementViewCtrl";
public const string PettyAwardCtrl = "PettyAwardCtrl";
public const string SaveingPotCtrl = "SaveingPotCtrl";
public const string GameAgainCtrl = "GameAgainCtrl";
public const string ArrowSettingCtrl = "ArrowSettingCtrl";
}
}
@@ -74,5 +74,13 @@ namespace RedHotRoast
public const string UnlockLevelNewModel = "UnlockLevelNewModel";
public const string BroadcastModel = "BroadcastModel";
public const string EggViewModel = "EggViewModel";
public const string ArrowGameModel = "ArrowGameModel";
public const string ArrowThemeModel = "ArrowThemeModel";
public const string ArrowTipsModel = "ArrowTipsModel";
public const string StatementViewModel = "StatementViewModel";
public const string PettyAwardModel = "PettyAwardModel";
public const string SaveingPotModel = "SaveingPotModel";
public const string GameAgainModel = "GameAgainModel";
public const string ArrowSettingModel = "ArrowSettingModel";
}
}
@@ -34,7 +34,6 @@ namespace RedHotRoast
moduleManager.AddModel(ModelConst.PassunlockModel, new PassunlockModel());
moduleManager.AddModel(ModelConst.BuygoldModel, new BuygoldModel());
moduleManager.AddModel(ModelConst.AdcomingModel, new AdcomingModel());
moduleManager.AddModel(ModelConst.MainTabModel, new MainTabModel());
moduleManager.AddModel(ModelConst.MailViewModel, new MailViewModel());
moduleManager.AddModel(ModelConst.PersonViewModel, new PersonViewModel());
moduleManager.AddModel(ModelConst.GuideViewModel, new GuideViewModel());
@@ -68,6 +67,15 @@ namespace RedHotRoast
moduleManager.AddModel(ModelConst.BroadcastModel, new BroadcastModel());
moduleManager.AddModel(ModelConst.EggViewModel, new EggViewModel());
moduleManager.AddModel(ModelConst.H5Model, new H5Model());
moduleManager.AddModel(ModelConst.ArrowGameModel, new ArrowGameModel());
moduleManager.AddModel(ModelConst.ArrowThemeModel, new ArrowThemeModel());
moduleManager.AddModel(ModelConst.ArrowTipsModel, new ArrowTipsModel());
moduleManager.AddModel(ModelConst.StatementViewModel, new StatementViewModel());
moduleManager.AddModel(ModelConst.PettyAwardModel, new PettyAwardModel());
moduleManager.AddModel(ModelConst.SaveingPotModel, new SaveingPotModel());
moduleManager.AddModel(ModelConst.MakeupConfirmModel, new MakeupConfirmModel());
moduleManager.AddModel(ModelConst.GameAgainModel, new GameAgainModel());
moduleManager.AddModel(ModelConst.ArrowSettingModel, new ArrowSettingModel());
}
public static void AutoRegisterUICtrl()
{
@@ -101,7 +109,6 @@ namespace RedHotRoast
moduleManager.AddUICtrl(UICtrlConst.PassViewUICtrl, new PassViewUICtrl());
moduleManager.AddUICtrl(UICtrlConst.PassunlockUICtrl, new PassunlockUICtrl());
moduleManager.AddUICtrl(UICtrlConst.BuygoldUICtrl, new BuygoldUICtrl());
moduleManager.AddUICtrl(UICtrlConst.MainTabUICtrl, new MainTabUICtrl());
moduleManager.AddUICtrl(UICtrlConst.MailViewUICtrl, new MailViewUICtrl());
moduleManager.AddUICtrl(UICtrlConst.PersonViewUICtrl, new PersonViewUICtrl());
moduleManager.AddUICtrl(UICtrlConst.GuideViewUICtrl, new GuideViewUICtrl());
@@ -136,6 +143,15 @@ namespace RedHotRoast
moduleManager.AddUICtrl(UICtrlConst.BroadcastUICtrl, new BroadcastUICtrl());
moduleManager.AddUICtrl(UICtrlConst.EggViewUICtrl, new EggViewUICtrl());
moduleManager.AddUICtrl(UICtrlConst.H5UICtrl, new H5UICtrl());
moduleManager.AddUICtrl(UICtrlConst.ArrowGameUICtrl, new ArrowGameUICtrl());
moduleManager.AddUICtrl(UICtrlConst.ArrowThemeUICtrl, new ArrowThemeUICtrl());
moduleManager.AddUICtrl(UICtrlConst.ArrowTipsUICtrl, new ArrowTipsUICtrl());
moduleManager.AddUICtrl(UICtrlConst.StatementViewUICtrl, new StatementViewUICtrl());
moduleManager.AddUICtrl(UICtrlConst.PettyAwardUICtrl, new PettyAwardUICtrl());
moduleManager.AddUICtrl(UICtrlConst.SaveingPotUICtrl, new SaveingPotUICtrl());
moduleManager.AddUICtrl(UICtrlConst.MakeupConfirmUICtrl, new MakeupConfirmUICtrl());
moduleManager.AddUICtrl(UICtrlConst.GameAgainUICtrl, new GameAgainUICtrl());
moduleManager.AddUICtrl(UICtrlConst.ArrowSettingUICtrl, new ArrowSettingUICtrl());
}
public static void AutoRegisterCtrl()
@@ -171,7 +187,6 @@ namespace RedHotRoast
moduleManager.AddCtrl(CtrlConst.PassViewCtrl, new PassViewCtrl());
moduleManager.AddCtrl(CtrlConst.PassunlockCtrl, new PassunlockCtrl());
moduleManager.AddCtrl(CtrlConst.BuygoldCtrl, new BuygoldCtrl());
moduleManager.AddCtrl(CtrlConst.MainTabCtrl, new MainTabCtrl());
moduleManager.AddCtrl(CtrlConst.MailViewCtrl, new MailViewCtrl());
moduleManager.AddCtrl(CtrlConst.PersonViewCtrl, new PersonViewCtrl());
moduleManager.AddCtrl(CtrlConst.GuideViewCtrl, new GuideViewCtrl());
@@ -211,6 +226,15 @@ namespace RedHotRoast
moduleManager.AddCtrl(CtrlConst.BroadcastCtrl, new BroadcastCtrl());
moduleManager.AddCtrl(CtrlConst.EggViewCtrl, new EggViewCtrl());
moduleManager.AddCtrl(CtrlConst.H5Ctrl, new H5Ctrl());
moduleManager.AddCtrl(CtrlConst.ArrowGameCtrl, new ArrowGameCtrl());
moduleManager.AddCtrl(CtrlConst.ArrowThemeCtrl, new ArrowThemeCtrl());
moduleManager.AddCtrl(CtrlConst.ArrowTipsCtrl, new ArrowTipsCtrl());
moduleManager.AddCtrl(CtrlConst.StatementViewCtrl, new StatementViewCtrl());
moduleManager.AddCtrl(CtrlConst.PettyAwardCtrl, new PettyAwardCtrl());
moduleManager.AddCtrl(CtrlConst.SaveingPotCtrl, new SaveingPotCtrl());
moduleManager.AddCtrl(CtrlConst.MakeupConfirmCtrl, new MakeupConfirmCtrl());
moduleManager.AddCtrl(CtrlConst.GameAgainCtrl, new GameAgainCtrl());
moduleManager.AddCtrl(CtrlConst.ArrowSettingCtrl, new ArrowSettingCtrl());
}
public static void AutoRegisterUIType()
@@ -246,7 +270,6 @@ namespace RedHotRoast
moduleManager.AddUIType(UIConst.PassViewUI, typeof(PassViewUI));
moduleManager.AddUIType(UIConst.PassunlockUI, typeof(PassunlockUI));
moduleManager.AddUIType(UIConst.BuygoldUI, typeof(BuygoldUI));
moduleManager.AddUIType(UIConst.MainTabUI, typeof(MainTabUI));
moduleManager.AddUIType(UIConst.MailViewUI, typeof(MailViewUI));
moduleManager.AddUIType(UIConst.PersonViewUI, typeof(PersonViewUI));
moduleManager.AddUIType(UIConst.GuideViewUI, typeof(GuideViewUI));
@@ -283,6 +306,16 @@ namespace RedHotRoast
moduleManager.AddUIType(UIConst.BroadcastUI, typeof(BroadcastUI));
moduleManager.AddUIType(UIConst.EggViewUI, typeof(EggViewUI));
moduleManager.AddUIType(UIConst.H5UI, typeof(H5UI));
moduleManager.AddUIType(UIConst.ArrowGameUI, typeof(ArrowGameUI));
moduleManager.AddUIType(UIConst.ArrowThemeUI, typeof(ArrowThemeUI));
moduleManager.AddUIType(UIConst.ArrowTipsUI, typeof(ArrowTipsUI));
moduleManager.AddUIType(UIConst.StatementViewUI, typeof(StatementViewUI));
moduleManager.AddUIType(UIConst.PettyAwardUI, typeof(PettyAwardUI));
moduleManager.AddUIType(UIConst.SaveingPotUI, typeof(SaveingPotUI));
moduleManager.AddUIType(UIConst.MakeupConfirmUI, typeof(MakeupConfirmUI));
moduleManager.AddUIType(UIConst.GameAgainUI, typeof(GameAgainUI));
moduleManager.AddUIType(UIConst.ArrowSettingUI, typeof(ArrowSettingUI));
}
}
}
+10
View File
@@ -73,5 +73,15 @@ namespace RedHotRoast
public const string UnlockLevelNewUI = "UnlockLevelNewUI";
public const string BroadcastUI = "BroadcastUI";
public const string EggViewUI = "EggViewUI";
public const string ArrowGameUI = "ArrowGameUI";
public const string ArrowThemeUI = "ArrowThemeUI";
public const string ArrowTipsUI = "ArrowTipsUI";
public const string StatementViewUI = "StatementViewUI";
public const string PettyAwardUI = "PettyAwardUI";
public const string SaveingPotUI = "SaveingPotUI";
public const string GameAgainUI = "GameAgainUI";
public const string ArrowSettingUI = "ArrowSettingUI";
}
}
@@ -74,5 +74,13 @@ namespace RedHotRoast
public const string UnlockLevelNewUICtrl = "UnlockLevelNewUICtrl";
public const string BroadcastUICtrl = "BroadcastUICtrl";
public const string EggViewUICtrl = "EggViewUICtrl";
public const string ArrowGameUICtrl = "ArrowGameUICtrl";
public const string ArrowThemeUICtrl = "ArrowThemeUICtrl";
public const string ArrowTipsUICtrl = "ArrowTipsUICtrl";
public const string StatementViewUICtrl = "StatementViewUICtrl";
public const string PettyAwardUICtrl = "PettyAwardUICtrl";
public const string SaveingPotUICtrl = "SaveingPotUICtrl";
public const string GameAgainUICtrl = "GameAgainUICtrl";
public const string ArrowSettingUICtrl = "ArrowSettingUICtrl";
}
}
+1 -1
View File
@@ -55,7 +55,7 @@ namespace RedHotRoast
{
TrackKit.SendEvent(GameHelper.GetEventName(), ADEventTrack.Property.buy_one_show);
if (args != null) need_call = (bool)args;
// ad_cool_down = ConfigSystem.GetConfig<CommonModel>().exchangeCD;
// ad_cool_down = ConfigSystem.GetCommonConf().exchangeCD;
// btn_WatchAd = ui.btn_watch as btn_watchAd;
if (GameHelper.IsAdModelOfPay())
{
+3
View File
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4ad5fece43d34a4abe58ce53bcb2aacc
timeCreated: 1783663847
@@ -1,10 +1,10 @@
namespace RedHotRoast
{
public class MainTabCtrl : BaseCtrl
public class ArrowGameCtrl : BaseCtrl
{
public static MainTabCtrl Instance { get; private set; }
public static ArrowGameCtrl Instance { get; private set; }
private MainTabModel model;
private ArrowGameModel model;
protected override void OnInit()
{
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 0dfe8f46fa1e414b944056bbe769fa67
timeCreated: 1781178068
@@ -0,0 +1,13 @@
namespace RedHotRoast
{
public class ArrowGameModel : BaseModel
{
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e6e908da0a114c6aab92325f6c42619d
timeCreated: 1781178068
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 1a4af5e7d0ee45ed84096f4ea23331c2
timeCreated: 1781178068
@@ -0,0 +1,91 @@
namespace RedHotRoast
{
public class ArrowGameUICtrl : BaseUICtrl
{
private ArrowGameUI ui;
private ArrowGameModel model;
private uint openUIMsg = UICtrlMsg.ArrowGameUI_Open;
private uint closeUIMsg = UICtrlMsg.ArrowGameUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.ArrowGameModel) as ArrowGameModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new ArrowGameUI(this);
ui.Open(args);
}
}
public override void CloseUI(object args = null)
{
if (ui != null && !ui.isClose)
{
ui.Close();
}
ui = null;
}
#endregion
#region
public override uint GetOpenUIMsg(string uiName)
{
return openUIMsg;
}
public override uint GetCloseUIMsg(string uiName)
{
return closeUIMsg;
}
protected override void AddListener()
{
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
GameDispatcher.Instance.AddListener(GameMsg.Update101, OnUpdate101);
GameDispatcher.Instance.AddListener(GameMsg.Update102, OnUpdate102);
}
protected override void RemoveListener()
{
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
GameDispatcher.Instance.RemoveListener(GameMsg.Update101, OnUpdate101);
GameDispatcher.Instance.RemoveListener(GameMsg.Update102, OnUpdate102);
}
private void OnUpdate101(object obj)
{
ui?.OnUpdate101(obj);
}
private void OnUpdate102(object obj)
{
ui?.OnUpdate102(obj);
}
protected override void AddServerListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 74f557b8baf9421bb8cc5c01adcd09b3
timeCreated: 1781178068
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2d45a99956a41ec4c9d004c296c6257c
guid: 190b796dd1421454494f5be3c67c35d3
folderAsset: yes
DefaultImporter:
externalObjects: {}
@@ -0,0 +1,50 @@
namespace RedHotRoast
{
public class ArrowSettingCtrl : BaseCtrl
{
public static ArrowSettingCtrl Instance { get; private set; }
private ArrowSettingModel model;
#region
protected override void OnInit()
{
Instance = this;
}
protected override void OnDispose()
{
Instance = null;
}
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
protected override void AddServerListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a719660d4b2e0254583b70941f0eede5
timeCreated: 1676360266
@@ -0,0 +1,69 @@
namespace RedHotRoast
{
public class ArrowSettingModel : BaseModel
{
public bool IsOpenMusic
{
get { return AudioManager.Instance.IsOpenBGM; }
set { AudioManager.Instance.IsOpenBGM = value; }
}
public bool IsOpenEffect
{
get { return AudioManager.Instance.IsOpenEffect; }
set { AudioManager.Instance.IsOpenEffect = value; }
}
#region
public string LangIdKey = "LangIdKey";
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
// protected override void OnReset()
// {
// }
// #endregion
// #region 读取数据
// protected override void OnReadData()
// {
// }
// #endregion
// #region 本地存储
// protected override void WriteLocalStorage()
// {
// }
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 9bbfb75ed03e0fc43a081b175504f450
timeCreated: 1676360266
@@ -0,0 +1,256 @@
using IgnoreOPS;
using FairyGUI;
using FGUI.ZM_Setting_07;
using IgnoreOPS;
using UnityEngine;
using btn_head = FGUI.ZM_Common_01.btn_head;
// using FGUI.G006_menu;
namespace RedHotRoast
{
public class ArrowSettingUI : BaseUI
{
private ArrowSettingUICtrl ctrl;
private ArrowSettingModel model;
private int _selectIndex = -1;
private const int TotalItem = 8;
private com_arrow_setting ui;
public ArrowSettingUI(ArrowSettingUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.ArrowSettingUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "ZM_Setting_07";
uiInfo.assetName = "com_arrow_setting";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
model = moduleManager.GetModel(ModelConst.ArrowSettingModel) as ArrowSettingModel;
}
protected override void OnClose()
{
// WebviewManager.ShezhiACT(true);
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
}
protected override void OnBind()
{
ui = baseUI as com_arrow_setting;
}
protected override void OnOpenBefore(object args)
{
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
// if (Screen.safeArea.y != 0)
// {
// ui.title.y += Screen.safeArea.y;
// }
// WebviewManager.ShezhiACT(false);
_selectIndex = DataMgr.PlayerAvatarId.Value;
GetSliderValueByScale((float)args);
InitView();
}
private void GetSliderValueByScale(float speed)
{
float validScale = Mathf.Clamp(speed, 1200f, 1700f);
float ratio = (validScale - 1200f) / (1700f - 1200f);
float sliderVal = ratio * 100f;
ui.speed_slide.value = Mathf.Clamp(sliderVal, 0f, 100f);
}
protected override void OnOpen(object args)
{
// CommonHelper.FadeIn(ui);
ui.show.Play();
}
protected override void OnHide()
{
}
protected override void OnDisplay(object args)
{
}
#endregion
#region
protected override void AddListener()
{
HallManager.Instance.AddChangeGiftSwitch(InitView);
}
protected override void RemoveListener()
{
HallManager.Instance.RemoveChangeGiftSwitch(InitView);
}
#endregion
private void InitView()
{
SetVersion();
SetUID();
var namStr = GameHelper.GetUserName();
ui.edit_name.input.text = namStr;
ui.btn_privacy.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 0); });
ui.btn_terms.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 1); });
ui.btn_official.SetClick(() => { OpenBrowser.OpenURL("http://captainsroll.com/"); });
ui.btn_us.SetClick(() => { GameHelper.OpenEmail(); });
ui.btn_revive.SetClick(() =>
{
GameDispatcher.Instance.Dispatch(GameMsg.reset_game, false);
CtrlCloseUI();
});
ui.level_text.SetVar("lv",GameHelper.GetLevel().ToString()).FlushVars();
ui.speed_slide.onChanged.Add(SetSlideValue);
ui.btn_music.on_off.selectedIndex =
model.IsOpenMusic ? 0 : 1;
ui.btn_sound.on_off.selectedIndex =
GRoot.inst.soundVolume > 0 ? 0 : 1;
ui.btn_music.SetClick(SetMusic);
ui.btn_sound.SetClick(SetSound);
ui.btn_close.SetClick(() =>
{
ui.hide.Play(UpdateUserInfo);
});
if (GameHelper.IsGiftSwitch())
{
// ui.btn_restore.visible = false;
}
else
{
ui.btn_us.visible = true;
}
ui.btn_restore.SetClick(() =>
{
// ApplePayManager.Instance.AppleRestore((success, message) =>
// {
// if (success)
// {
// GameHelper.ShowTips("Restore Purchases Success!");
// // SaveData.GetSaveObject().is_get_packreward = success;
// SaveData.GetSaveObject().have_slot = success;
// GameDispatcher.Instance.Dispatch(GameMsg.noads_refresh);
// }
// else
// {
// // Debug.Log("[barry] restore failed: " + success);
// GameHelper.ShowTips("There are no recoverable transactions");
// }
// });
});
}
private void SetSlideValue()
{
var sliderValue = (float)ui.speed_slide.value;
// 先把滑块值钳位在 0~100 内
float val = Mathf.Clamp(sliderValue, 0f, 100f);
// 线性映射:0→0.6100→1.5
float ratio = val / 100f;
float speed = 1200f + ratio * (1700f - 1200f);
speed = Mathf.Clamp(speed, 1200f, 1700f);
GameDispatcher.Instance.Dispatch(GameMsg.UpdateSpeed, speed);
}
private void SetMusic()
{
model.IsOpenMusic = !model.IsOpenMusic;
ui.btn_music.on_off.selectedIndex = model.IsOpenMusic
? 0
: 1;
}
private void SetSound()
{
var sound = GRoot.inst.soundVolume;
sound = sound > 0 ? 0 : 1;
GRoot.inst.soundVolume = sound;
PlayerPrefs.SetFloat("soundVolume", sound);
ui.btn_sound.on_off.selectedIndex = sound > 0
? 0
: 1;
}
private void SetVersion()
{
// Debug.Log($"SetVersion====== {Application.version}");
ui.text_version.SetVar("count", Application.version).FlushVars();
}
private void SetUID()
{
ui.text_uid.SetVar("UID", GameHelper.GetLoginModel().Uid.ToString()).FlushVars();
}
private void SetAvatar()
{
if (_selectIndex != -1 && _selectIndex != DataMgr.PlayerAvatarId.Value)
{
DataMgr.PlayerAvatarId.Value = _selectIndex;
}
}
private void UpdateUserInfo()
{
SaveName();
CtrlCloseUI();
}
private void SaveName()
{
var name = ui.edit_name.input.text;
if (string.IsNullOrEmpty(name) || name.IsNullOrWhiteSpace())
{
GameHelper.ShowTips("The input cannot be null", true);
return;
}
if (name.Equals(DataMgr.PlayerName)) return;
// GameHelper.ShowTips("Name changed successfully");
DataMgr.PlayerName.Value = name;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f70e08a1fa35f7e4296d5b0f093cba6e
timeCreated: 1676360265
@@ -0,0 +1,82 @@
namespace RedHotRoast
{
public class ArrowSettingUICtrl : BaseUICtrl
{
private ArrowSettingUI ui;
private ArrowSettingModel model;
private uint openUIMsg = UICtrlMsg.ArrowSettingUI_Open;
private uint closeUIMsg = UICtrlMsg.ArrowSettingUI_Close;
#region
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new ArrowSettingUI(this);
ui.Open(args);
}
}
public override void CloseUI(object args = null)
{
if (ui != null && !ui.isClose)
{
ui.Close();
}
ui = null;
}
#endregion
#region
public override uint GetOpenUIMsg(string uiName)
{
return openUIMsg;
}
public override uint GetCloseUIMsg(string uiName)
{
return closeUIMsg;
}
protected override void AddListener()
{
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
}
protected override void RemoveListener()
{
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
}
protected override void AddServerListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: c878a49cee89b2047b83b09db20d1c12
timeCreated: 1676360266
+3
View File
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 397e677967c6452c9810742ba0f08b27
timeCreated: 1783663847
@@ -0,0 +1,41 @@
namespace RedHotRoast
{
public class ArrowThemeCtrl : BaseCtrl
{
public static ArrowThemeCtrl Instance { get; private set; }
private ArrowThemeModel model;
#region
protected override void OnInit()
{
Instance = this;
}
protected override void OnDispose()
{
Instance = null;
}
#endregion
#region
protected override void RemoveListener()
{
}
protected override void AddServerListener()
{
}
protected override void AddListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e50273fc8b5c4fd28617651e820de81c
timeCreated: 1781573811
@@ -0,0 +1,43 @@
namespace RedHotRoast
{
public class ArrowThemeModel : BaseModel
{
#region
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
// protected override void OnReset()
// {
// }
// #endregion
// #region 读取数据
// protected override void OnReadData()
// {
// }
// #endregion
// #region 本地存储
// protected override void WriteLocalStorage()
// {
// }
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: cf2b28aa9d18433f9e27343cfcab577d
timeCreated: 1781573811
@@ -0,0 +1,149 @@
using System;
using FGUI.Arrow_game;
using FGUI.Arrow_Theme;
namespace RedHotRoast
{
public class ArrowThemeUI : BaseUI
{
private ArrowThemeUICtrl ctrl;
private ArrowThemeModel model;
private com_theme ui;
private Action closeCallback;
public ArrowThemeUI(ArrowThemeUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.ArrowThemeUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "Arrow_Theme";
uiInfo.assetName = "com_theme";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = true;
uiInfo.isNeedCloseAnim = true;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.GameResultModel) as GameResultModel;
}
protected override void OnClose()
{
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
}
//
protected override void OnBind()
{
ui = baseUI as com_theme;
}
private SuccessData successData_;
protected override void OnOpenBefore(object args)
{
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
ui.btn_switch.state.selectedIndex = DataMgr.ArrowDarkTheme.Value;
SetBtnState();
ui.btn_dark.SetClick(() => { SetBtnClick(0); });
// ui.btn_worm.SetClick(() => { SetBtnClick(1); });
ui.btn_colours.SetClick(() => { SetBtnClick(2); });
ui.btn_switch.SetClick(() =>
{
if (DataMgr.ArrowDarkTheme.Value == 0)
{
DataMgr.ArrowDarkTheme.Value = 1;
}
else
{
DataMgr.ArrowDarkTheme.Value = 0;
}
ui.btn_switch.state.selectedIndex = DataMgr.ArrowDarkTheme.Value;
GameDispatcher.Instance.Dispatch(GameMsg.ThemeChange);
});
ui.btn_close.SetClick(() =>
{
CtrlCloseUI();
});
}
private void SetBtnClick(int index)
{
DataMgr.ArrowTheme.Value = index;
SetBtnState();
GameDispatcher.Instance.Dispatch(GameMsg.ThemeChange);
}
private void SetBtnState()
{
switch (DataMgr.ArrowTheme.Value)
{
case 0:
((btn_green)ui.btn_dark).touchable = false;
((btn_green)ui.btn_worm).touchable = true;
((btn_green)ui.btn_colours).touchable = true;
((btn_green)ui.btn_dark).state.selectedIndex = 0;
((btn_green)ui.btn_worm).state.selectedIndex = 1;
((btn_green)ui.btn_colours).state.selectedIndex = 1;
break;
case 1:
((btn_green)ui.btn_dark).touchable = true;
((btn_green)ui.btn_worm).touchable = false;
((btn_green)ui.btn_colours).touchable = true;
((btn_green)ui.btn_dark).state.selectedIndex = 1;
((btn_green)ui.btn_worm).state.selectedIndex = 0;
((btn_green)ui.btn_colours).state.selectedIndex = 1;
break;
case 2:
((btn_green)ui.btn_dark).touchable = true;
((btn_green)ui.btn_worm).touchable = true;
((btn_green)ui.btn_colours).touchable = false;
((btn_green)ui.btn_dark).state.selectedIndex = 1;
((btn_green)ui.btn_worm).state.selectedIndex = 1;
((btn_green)ui.btn_colours).state.selectedIndex = 0;
break;
}
}
protected override void OnOpen(object args)
{
}
protected override void OnHide()
{
}
protected override void OnDisplay(object args)
{
}
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
private int time_count;
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 730d3bd4697242e9a28a7f9b2933bcbb
timeCreated: 1781573811
@@ -0,0 +1,87 @@
using DG.Tweening;
namespace RedHotRoast
{
public class ArrowThemeUICtrl : BaseUICtrl
{
private ArrowThemeUI ui;
private ArrowThemeModel model;
private uint openUIMsg = UICtrlMsg.ArrowThemeUI_Open;
private uint closeUIMsg = UICtrlMsg.ArrowThemeUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.GameResultModel) as GameResultModel;
}
protected override void OnDispose()
{
}
private object m_data;
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new ArrowThemeUI(this);
ui.Open(args);
}
else
{
m_data ??= args;
}
}
public override void CloseUI(object args = null)
{
if (ui != null && !ui.isClose)
{
ui.Close();
}
ui = null;
if (m_data != null)
{
DOVirtual.DelayedCall(0.2f, () =>
{
OpenUI(m_data);
m_data = null;
});
}
}
#endregion
#region
public override uint GetOpenUIMsg(string uiName)
{
return openUIMsg;
}
public override uint GetCloseUIMsg(string uiName)
{
return closeUIMsg;
}
protected override void AddListener()
{
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
}
protected override void RemoveListener()
{
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
}
protected override void AddServerListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f49d5a3813264e589acb43f743d50d24
timeCreated: 1781573811
+3
View File
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 62a730aa391641bf93ef2840dce2dcbc
timeCreated: 1783663847
@@ -0,0 +1,19 @@
namespace RedHotRoast
{
public class ArrowTipsCtrl : BaseCtrl
{
public static ArrowTipsCtrl Instance { get; private set; }
private ArrowTipsModel model;
protected override void OnInit()
{
Instance = this;
}
protected override void OnDispose()
{
Instance = null;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d070658caacf42a79ba55d6ac90d78a6
timeCreated: 1781677288
@@ -1,6 +1,6 @@
namespace RedHotRoast
{
public class MainTabModel : BaseModel
public class ArrowTipsModel : BaseModel
{
protected override void OnInit()
{
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4051b0d4995a4a1399d64e95c6c582f1
timeCreated: 1781677288
@@ -0,0 +1,127 @@
using System;
using FGUI.Arrow_game;
using IgnoreOPS;
using UnityEngine;
namespace RedHotRoast
{
public class ArrowTipsUI : BaseUI
{
private ArrowTipsUICtrl ctrl;
private ArrowTipsModel model;
private com_tips ui;
public ArrowTipsUI(ArrowTipsUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.ArrowTipsUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "Arrow_game";
uiInfo.assetName = "com_tips";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedUIMask = true;
uiInfo.isNeedOpenAnim = true;
uiInfo.isNeedCloseAnim = true;
}
protected override void OnInit()
{
}
protected override void OnClose()
{
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
CommonHelper.FadeOut(ui);
HallManager.Instance.UpdateSecondEvent -= UpdateCd;
}
protected override void OnBind()
{
ui = baseUI as com_tips;
}
private int state_;
protected override void OnOpenBefore(object args)
{
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
if (args != null)
{
InitView((int)args);
state_ = (int)args + 5;
}
HallManager.Instance.UpdateSecondEvent += UpdateCd;
UpdateCd();
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetCommonConf().PiggyBankSwitch == 1)
{
ui.btn_watch.img_saveingpot.visible = true;
}
}
protected override void OnOpen(object args)
{
CommonHelper.FadeIn(ui);
}
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
private void InitView(int type)
{
int state = type;
Debug.Log($"tips state = {state} ");
// 0 提示 1 删除道具
ui.state.selectedIndex = state;
ui.btn_watch.SetClick(() =>
{
string idStr = state == 1 ? "deletePop" : "HintPop";
GameHelper.ShowVideoAd(idStr, isSuccess =>
{
if (isSuccess)
{
Debug.Log($"isSuccess tips state = {state} ");
GameHelper.SetWatchCd(state_);
GameDispatcher.Instance.Dispatch(GameMsg.UseProps, state);
CtrlCloseUI();
}
});
});
ui.btn_close.SetClick(CtrlCloseUI);
}
private void UpdateCd()
{
var btnWatch = ui.btn_watch ;
// Debug.Log($"DataMgr.NewWatchCd.Value[state_ + 2]==={DataMgr.NewWatchCd.Value[state_ + 2]}");
if (DataMgr.NewWatchCd.Value[state_] > Convert.ToInt32(GameHelper.GetNowTime()))
{
btnWatch.enabled = false;
btnWatch.can.selectedIndex = 1;
btnWatch.text.text = CommonHelper.TimeFormat(DataMgr.NewWatchCd.Value[state_] - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
}
else
{
ui.btn_watch.enabled = true;
btnWatch.can.selectedIndex = 0;
btnWatch.text.text = "Use Item";
}
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4737faa4124f48fabc5ef35ef2ff9f2f
timeCreated: 1781677288
@@ -1,14 +1,12 @@
namespace RedHotRoast
{
public class MainTabUICtrl : BaseUICtrl
public class ArrowTipsUICtrl : BaseUICtrl
{
private MainTabUI ui;
private MainTabModel model;
private ArrowTipsUI ui;
private ArrowTipsModel model;
private uint openUIMsg = UICtrlMsg.MainTabUI_Open;
private uint closeUIMsg = UICtrlMsg.MainTabUI_Close;
#region
private uint openUIMsg = UICtrlMsg.ArrowTipsUI_Open;
private uint closeUIMsg = UICtrlMsg.ArrowTipsUI_Close;
protected override void OnInit()
{
@@ -22,7 +20,7 @@ namespace RedHotRoast
{
if (ui == null)
{
ui = new MainTabUI(this);
ui = new ArrowTipsUI(this);
ui.Open(args);
}
}
@@ -37,10 +35,6 @@ namespace RedHotRoast
ui = null;
}
#endregion
#region
public override uint GetOpenUIMsg(string uiName)
{
return openUIMsg;
@@ -62,9 +56,5 @@ namespace RedHotRoast
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 5e1a6be77c1c462a86ed773072d923d3
timeCreated: 1781677288
+3
View File
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4cb018e70f844a67a2dd33d04abf6318
timeCreated: 1783672661
@@ -0,0 +1,41 @@
namespace RedHotRoast
{
public class GameAgainCtrl : BaseCtrl
{
public static GameAgainCtrl Instance { get; private set; }
private GameAgainModel model;
#region
protected override void OnInit()
{
Instance = this;
}
protected override void OnDispose()
{
Instance = null;
}
#endregion
#region
protected override void RemoveListener()
{
}
protected override void AddServerListener()
{
}
protected override void AddListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: cee917424e204aeeb572fbd21d9a216a
timeCreated: 1781331027
@@ -0,0 +1,43 @@
namespace RedHotRoast
{
public class GameAgainModel : BaseModel
{
#region
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
// protected override void OnReset()
// {
// }
// #endregion
// #region 读取数据
// protected override void OnReadData()
// {
// }
// #endregion
// #region 本地存储
// protected override void WriteLocalStorage()
// {
// }
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: ba9f90a8f17245beb5fb93275fb663af
timeCreated: 1781331027
@@ -0,0 +1,110 @@
using System;
using DG.Tweening;
using FGUI.GameResult_08;
using UnityEngine;
namespace RedHotRoast
{
public class GameAgainUI : BaseUI
{
private GameAgainUICtrl ctrl;
private GameAgainModel model;
private com_arrow_end_again ui;
private Action closeCallback;
public GameAgainUI(GameAgainUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.GameAgainUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "GameResult_08";
uiInfo.assetName = "com_arrow_end_again";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = true;
uiInfo.isNeedCloseAnim = true;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.GameResultModel) as GameResultModel;
}
protected override void OnClose()
{
}
//
protected override void OnBind()
{
ui = baseUI as com_arrow_end_again;
}
private SuccessData successData_;
protected override void OnOpenBefore(object args)
{
ui.btn_revive.SetClick(() =>
{
float[] cash_array = GameHelper.GetRewardValue(2);
var temp = new SuccessData();
temp.IsWin = false;
temp.ch_number = cash_array[0];
temp.IsLevelSuccess = true;
temp.IsH5Reward = false;
temp.boost_array = GameHelper.GetRewardBoost(2);
DOVirtual.DelayedCall(0.1f, () =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Open, temp);
});
CtrlCloseUI();
});
ui.btn_restart.SetClick(() =>
{
GameDispatcher.Instance.Dispatch(GameMsg.reset_game, false);
CtrlCloseUI();
});
ui.btn_back.SetClick(() =>
{
GameDispatcher.Instance.Dispatch(GameMsg.reset_game, false);
CtrlCloseUI();
});
}
protected override void OnOpen(object args)
{
}
protected override void OnHide()
{
}
protected override void OnDisplay(object args)
{
}
#endregion
#region
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
#endregion
private int time_count;
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: cb749d47d61d49feb70387124d69b69f
timeCreated: 1781331027
@@ -0,0 +1,87 @@
using DG.Tweening;
namespace RedHotRoast
{
public class GameAgainUICtrl : BaseUICtrl
{
private GameAgainUI ui;
private GameAgainModel model;
private uint openUIMsg = UICtrlMsg.GameAgainUI_Open;
private uint closeUIMsg = UICtrlMsg.GameAgainUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.GameResultModel) as GameResultModel;
}
protected override void OnDispose()
{
}
private object m_data;
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new GameAgainUI(this);
ui.Open(args);
}
else
{
m_data ??= args;
}
}
public override void CloseUI(object args = null)
{
if (ui != null && !ui.isClose)
{
ui.Close();
}
ui = null;
if (m_data != null)
{
DOVirtual.DelayedCall(0.2f, () =>
{
OpenUI(m_data);
m_data = null;
});
}
}
#endregion
#region
public override uint GetOpenUIMsg(string uiName)
{
return openUIMsg;
}
public override uint GetCloseUIMsg(string uiName)
{
return closeUIMsg;
}
protected override void AddListener()
{
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
}
protected override void RemoveListener()
{
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
}
protected override void AddServerListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b83d7c197169420da4fb3e79d330a74d
timeCreated: 1781331027
@@ -106,7 +106,7 @@ namespace RedHotRoast
}
if (reward == null) reward = turn_list[0];
ui.text_goldnum.text = max_gold.ToString();
// if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
// if (GameHelper.IsGiftSwitch() && ConfigSystem.GetCommonConf().PiggyBankSwitch == 1)
// {
// (ui.btn_receive.GetChild("img_saveingpot") as GImage).visible = true;
// }
+4 -4
View File
@@ -113,13 +113,13 @@ namespace RedHotRoast
private void OnClickFlyCash()
{
// PreferencesMgr.Instance.AdCashFlyShowTime =
// GameHelper.GetNowTime() + ConfigSystem.GetConfig<CommonModel>().flyCD;
// GameHelper.GetNowTime() + ConfigSystem.GetCommonConf().flyCD;
// var rewardData = new RewardData();
// var singleValue =
// (decimal)Math.Round(
// UnityEngine.Random.Range(ConfigSystem.GetConfig<CommonModel>().flyReward[0],
// ConfigSystem.GetConfig<CommonModel>().flyReward[1]), 2);
// UnityEngine.Random.Range(ConfigSystem.GetCommonConf().flyReward[0],
// ConfigSystem.GetCommonConf().flyReward[1]), 2);
// decimal rewardValue;
@@ -172,7 +172,7 @@ namespace RedHotRoast
private void OnClickIcon()
{
// //WebThroughUtil.WebThroughClick(H5WebThroughType.OnlineH5, ui.btn_icon);
// if (iconTime < ConfigSystem.GetConfig<CommonModel>().ThroughRewardCD)
// if (iconTime < ConfigSystem.GetCommonConf().ThroughRewardCD)
// {
// return;
// }

Some files were not shown because too many files have changed in this diff Show More