diff --git a/Assets/ChillConnect/Define/Message/UICtrlMsg_OpenClose.cs b/Assets/ChillConnect/Define/Message/UICtrlMsg_OpenClose.cs index ccaa22e..bd5e2fe 100644 --- a/Assets/ChillConnect/Define/Message/UICtrlMsg_OpenClose.cs +++ b/Assets/ChillConnect/Define/Message/UICtrlMsg_OpenClose.cs @@ -136,6 +136,8 @@ namespace ChillConnect public static uint StatementViewUI_Open = ++cursor_OpenClose; public static uint StatementViewUI_Close = ++cursor_OpenClose; public static uint GameAgainUI_Open = ++cursor_OpenClose; - public static uint GameAgainUI_Close = ++cursor_OpenClose; + public static uint GameAgainUI_Close = ++cursor_OpenClose; + public static uint ArrowThemeUI_Open = ++cursor_OpenClose; + public static uint ArrowThemeUI_Close = ++cursor_OpenClose; } } \ No newline at end of file diff --git a/Assets/ChillConnect/FGUI/package/Arrow_Theme.meta b/Assets/ChillConnect/FGUI/package/Arrow_Theme.meta new file mode 100644 index 0000000..c57b18b --- /dev/null +++ b/Assets/ChillConnect/FGUI/package/Arrow_Theme.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 71fa9dea88bf98e499c0019e2ba1103a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ChillConnect/FGUI/package/Arrow_Theme/Arrow_ThemeBinder.cs b/Assets/ChillConnect/FGUI/package/Arrow_Theme/Arrow_ThemeBinder.cs new file mode 100644 index 0000000..ae4a70e --- /dev/null +++ b/Assets/ChillConnect/FGUI/package/Arrow_Theme/Arrow_ThemeBinder.cs @@ -0,0 +1,15 @@ +/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ + +using FairyGUI; + +namespace FGUI.Arrow_Theme +{ + public class Arrow_ThemeBinder + { + public static void BindAll() + { + UIObjectFactory.SetPackageItemExtension(com_theme.URL, typeof(com_theme)); + UIObjectFactory.SetPackageItemExtension(btn_switch.URL, typeof(btn_switch)); + } + } +} \ No newline at end of file diff --git a/Assets/ChillConnect/FGUI/package/Arrow_game/btn_big.cs.meta b/Assets/ChillConnect/FGUI/package/Arrow_Theme/Arrow_ThemeBinder.cs.meta similarity index 83% rename from Assets/ChillConnect/FGUI/package/Arrow_game/btn_big.cs.meta rename to Assets/ChillConnect/FGUI/package/Arrow_Theme/Arrow_ThemeBinder.cs.meta index 8a8d4b2..22e9a2a 100644 --- a/Assets/ChillConnect/FGUI/package/Arrow_game/btn_big.cs.meta +++ b/Assets/ChillConnect/FGUI/package/Arrow_Theme/Arrow_ThemeBinder.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: abd26fd11b29a084b93baa0d815ca0e4 +guid: 0fdfc674f2520c5438b329d198527648 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/ChillConnect/FGUI/package/Arrow_Theme/btn_switch.cs b/Assets/ChillConnect/FGUI/package/Arrow_Theme/btn_switch.cs new file mode 100644 index 0000000..008ad8e --- /dev/null +++ b/Assets/ChillConnect/FGUI/package/Arrow_Theme/btn_switch.cs @@ -0,0 +1,25 @@ +/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ + +using FairyGUI; +using FairyGUI.Utils; + +namespace FGUI.Arrow_Theme +{ + public partial class btn_switch : GButton + { + public Controller state; + public const string URL = "ui://nie197ferto36"; + + public static btn_switch CreateInstance() + { + return (btn_switch)UIPackage.CreateObject("Arrow_Theme", "btn_switch"); + } + + public override void ConstructFromXML(XML xml) + { + base.ConstructFromXML(xml); + + state = GetControllerAt(0); + } + } +} \ No newline at end of file diff --git a/Assets/ChillConnect/FGUI/package/Arrow_Theme/btn_switch.cs.meta b/Assets/ChillConnect/FGUI/package/Arrow_Theme/btn_switch.cs.meta new file mode 100644 index 0000000..4e1657f --- /dev/null +++ b/Assets/ChillConnect/FGUI/package/Arrow_Theme/btn_switch.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fadc5d0fe42196844b1e8bf79cb4e8b9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ChillConnect/FGUI/package/Arrow_Theme/com_theme.cs b/Assets/ChillConnect/FGUI/package/Arrow_Theme/com_theme.cs new file mode 100644 index 0000000..d419663 --- /dev/null +++ b/Assets/ChillConnect/FGUI/package/Arrow_Theme/com_theme.cs @@ -0,0 +1,33 @@ +/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ + +using FairyGUI; +using FairyGUI.Utils; + +namespace FGUI.Arrow_Theme +{ + public partial class com_theme : GComponent + { + public GButton btn_dark; + public GButton btn_worm; + public GButton btn_colours; + public btn_switch btn_switch; + public GButton btn_close; + public const string URL = "ui://nie197ferto34"; + + public static com_theme CreateInstance() + { + return (com_theme)UIPackage.CreateObject("Arrow_Theme", "com_theme"); + } + + public override void ConstructFromXML(XML xml) + { + base.ConstructFromXML(xml); + + btn_dark = (GButton)GetChildAt(6); + btn_worm = (GButton)GetChildAt(7); + btn_colours = (GButton)GetChildAt(8); + btn_switch = (btn_switch)GetChildAt(10); + btn_close = (GButton)GetChildAt(11); + } + } +} \ No newline at end of file diff --git a/Assets/ChillConnect/FGUI/package/Arrow_Theme/com_theme.cs.meta b/Assets/ChillConnect/FGUI/package/Arrow_Theme/com_theme.cs.meta new file mode 100644 index 0000000..1a27053 --- /dev/null +++ b/Assets/ChillConnect/FGUI/package/Arrow_Theme/com_theme.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7ef43e8e4c04a9c42a94f70f467c6353 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ChillConnect/FGUI/package/Arrow_game/Arrow_gameBinder.cs b/Assets/ChillConnect/FGUI/package/Arrow_game/Arrow_gameBinder.cs index 4de661d..c882cf1 100644 --- a/Assets/ChillConnect/FGUI/package/Arrow_game/Arrow_gameBinder.cs +++ b/Assets/ChillConnect/FGUI/package/Arrow_game/Arrow_gameBinder.cs @@ -14,7 +14,10 @@ namespace FGUI.Arrow_game UIObjectFactory.SetPackageItemExtension(ArrorPoint.URL, typeof(ArrorPoint)); UIObjectFactory.SetPackageItemExtension(HeartsPanel.URL, typeof(HeartsPanel)); UIObjectFactory.SetPackageItemExtension(com_finger.URL, typeof(com_finger)); - UIObjectFactory.SetPackageItemExtension(btn_big.URL, typeof(btn_big)); + UIObjectFactory.SetPackageItemExtension(btn_saveingpot.URL, typeof(btn_saveingpot)); + UIObjectFactory.SetPackageItemExtension(btn_petty.URL, typeof(btn_petty)); + UIObjectFactory.SetPackageItemExtension(btn_green.URL, typeof(btn_green)); + UIObjectFactory.SetPackageItemExtension(com_bottom.URL, typeof(com_bottom)); } } } \ No newline at end of file diff --git a/Assets/ChillConnect/FGUI/package/Arrow_game/btn_big.cs b/Assets/ChillConnect/FGUI/package/Arrow_game/btn_green.cs similarity index 55% rename from Assets/ChillConnect/FGUI/package/Arrow_game/btn_big.cs rename to Assets/ChillConnect/FGUI/package/Arrow_game/btn_green.cs index bed9772..c3d57d6 100644 --- a/Assets/ChillConnect/FGUI/package/Arrow_game/btn_big.cs +++ b/Assets/ChillConnect/FGUI/package/Arrow_game/btn_green.cs @@ -5,16 +5,15 @@ using FairyGUI.Utils; namespace FGUI.Arrow_game { - public partial class btn_big : GButton + public partial class btn_green : GButton { public Controller state; - public GImage bg; public GTextField text; - public const string URL = "ui://sjl9teijrsd4g"; + public const string URL = "ui://sjl9teijrto31j"; - public static btn_big CreateInstance() + public static btn_green CreateInstance() { - return (btn_big)UIPackage.CreateObject("Arrow_game", "btn_big"); + return (btn_green)UIPackage.CreateObject("Arrow_game", "btn_green"); } public override void ConstructFromXML(XML xml) @@ -22,8 +21,7 @@ namespace FGUI.Arrow_game base.ConstructFromXML(xml); state = GetControllerAt(0); - bg = (GImage)GetChildAt(0); - text = (GTextField)GetChildAt(1); + text = (GTextField)GetChildAt(2); } } } \ No newline at end of file diff --git a/Assets/ChillConnect/FGUI/package/Arrow_game/btn_green.cs.meta b/Assets/ChillConnect/FGUI/package/Arrow_game/btn_green.cs.meta new file mode 100644 index 0000000..f7690cf --- /dev/null +++ b/Assets/ChillConnect/FGUI/package/Arrow_game/btn_green.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 49df393f451adc24298d933d840cb2ce +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ChillConnect/FGUI/package/Arrow_game/btn_petty.cs b/Assets/ChillConnect/FGUI/package/Arrow_game/btn_petty.cs new file mode 100644 index 0000000..358b5f5 --- /dev/null +++ b/Assets/ChillConnect/FGUI/package/Arrow_game/btn_petty.cs @@ -0,0 +1,27 @@ +/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ + +using FairyGUI; +using FairyGUI.Utils; + +namespace FGUI.Arrow_game +{ + public partial class btn_petty : GButton + { + public GGroup kuang; + public Transition t0; + public const string URL = "ui://sjl9teijrto31f"; + + public static btn_petty CreateInstance() + { + return (btn_petty)UIPackage.CreateObject("Arrow_game", "btn_petty"); + } + + public override void ConstructFromXML(XML xml) + { + base.ConstructFromXML(xml); + + kuang = (GGroup)GetChildAt(4); + t0 = GetTransitionAt(0); + } + } +} \ No newline at end of file diff --git a/Assets/ChillConnect/FGUI/package/Arrow_game/btn_petty.cs.meta b/Assets/ChillConnect/FGUI/package/Arrow_game/btn_petty.cs.meta new file mode 100644 index 0000000..8fc4b49 --- /dev/null +++ b/Assets/ChillConnect/FGUI/package/Arrow_game/btn_petty.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fa4c32dcaf88f4541a805f3e01b38234 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ChillConnect/FGUI/package/Arrow_game/btn_saveingpot.cs b/Assets/ChillConnect/FGUI/package/Arrow_game/btn_saveingpot.cs new file mode 100644 index 0000000..a6dbb7a --- /dev/null +++ b/Assets/ChillConnect/FGUI/package/Arrow_game/btn_saveingpot.cs @@ -0,0 +1,27 @@ +/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ + +using FairyGUI; +using FairyGUI.Utils; + +namespace FGUI.Arrow_game +{ + public partial class btn_saveingpot : GButton + { + public GImage img; + public GTextField lab_time; + public const string URL = "ui://sjl9teijrto31e"; + + public static btn_saveingpot CreateInstance() + { + return (btn_saveingpot)UIPackage.CreateObject("Arrow_game", "btn_saveingpot"); + } + + public override void ConstructFromXML(XML xml) + { + base.ConstructFromXML(xml); + + img = (GImage)GetChildAt(0); + lab_time = (GTextField)GetChildAt(1); + } + } +} \ No newline at end of file diff --git a/Assets/ChillConnect/FGUI/package/Arrow_game/btn_saveingpot.cs.meta b/Assets/ChillConnect/FGUI/package/Arrow_game/btn_saveingpot.cs.meta new file mode 100644 index 0000000..0a535d0 --- /dev/null +++ b/Assets/ChillConnect/FGUI/package/Arrow_game/btn_saveingpot.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 97ae33010cba77f4ea99d559bfa5664e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ChillConnect/FGUI/package/Arrow_game/com_arrow_game.cs b/Assets/ChillConnect/FGUI/package/Arrow_game/com_arrow_game.cs index 9f2293d..152af15 100644 --- a/Assets/ChillConnect/FGUI/package/Arrow_game/com_arrow_game.cs +++ b/Assets/ChillConnect/FGUI/package/Arrow_game/com_arrow_game.cs @@ -8,20 +8,19 @@ namespace FGUI.Arrow_game public partial class com_arrow_game : GComponent { public Controller mode; - public GButton btn_menu; public GComponent view_container; public ArrorPoint point; public GButton btn_close; public GComponent com_money; public HeartsPanel HeartsPanel; - public GButton btn_clear; - public GButton btn_hint; public com_finger com_finger; - public btn_big btn_big; - public btn_big btn_small; - public GSlider zoomSlide; public GGraph samll_point; public GTextField text_level; + public com_bottom com_bottom; + public btn_petty btn_petty; + public btn_saveingpot btn_saveingpot; + public GButton btn_statement; + public GButton btn_signin; public const string URL = "ui://sjl9teijrsd40"; public static com_arrow_game CreateInstance() @@ -34,20 +33,19 @@ namespace FGUI.Arrow_game base.ConstructFromXML(xml); mode = GetControllerAt(0); - btn_menu = (GButton)GetChildAt(2); - view_container = (GComponent)GetChildAt(3); - point = (ArrorPoint)GetChildAt(4); - btn_close = (GButton)GetChildAt(5); - com_money = (GComponent)GetChildAt(6); - HeartsPanel = (HeartsPanel)GetChildAt(7); - btn_clear = (GButton)GetChildAt(9); - btn_hint = (GButton)GetChildAt(10); - com_finger = (com_finger)GetChildAt(11); - btn_big = (btn_big)GetChildAt(12); - btn_small = (btn_big)GetChildAt(13); - zoomSlide = (GSlider)GetChildAt(14); - samll_point = (GGraph)GetChildAt(15); - text_level = (GTextField)GetChildAt(17); + view_container = (GComponent)GetChildAt(2); + point = (ArrorPoint)GetChildAt(3); + btn_close = (GButton)GetChildAt(4); + com_money = (GComponent)GetChildAt(5); + HeartsPanel = (HeartsPanel)GetChildAt(6); + com_finger = (com_finger)GetChildAt(7); + samll_point = (GGraph)GetChildAt(8); + text_level = (GTextField)GetChildAt(10); + com_bottom = (com_bottom)GetChildAt(12); + btn_petty = (btn_petty)GetChildAt(13); + btn_saveingpot = (btn_saveingpot)GetChildAt(14); + btn_statement = (GButton)GetChildAt(15); + btn_signin = (GButton)GetChildAt(16); } } } \ No newline at end of file diff --git a/Assets/ChillConnect/FGUI/package/Arrow_game/com_bottom.cs b/Assets/ChillConnect/FGUI/package/Arrow_game/com_bottom.cs new file mode 100644 index 0000000..fc1de65 --- /dev/null +++ b/Assets/ChillConnect/FGUI/package/Arrow_game/com_bottom.cs @@ -0,0 +1,33 @@ +/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ + +using FairyGUI; +using FairyGUI.Utils; + +namespace FGUI.Arrow_game +{ + public partial class com_bottom : GComponent + { + public GButton btn_clear; + public GButton btn_hint; + public GSlider zoomSlide; + public GButton btn_skin; + public GButton btn_setting; + public const string URL = "ui://sjl9teijrto3x"; + + public static com_bottom CreateInstance() + { + return (com_bottom)UIPackage.CreateObject("Arrow_game", "com_bottom"); + } + + public override void ConstructFromXML(XML xml) + { + base.ConstructFromXML(xml); + + btn_clear = (GButton)GetChildAt(2); + btn_hint = (GButton)GetChildAt(3); + zoomSlide = (GSlider)GetChildAt(4); + btn_skin = (GButton)GetChildAt(9); + btn_setting = (GButton)GetChildAt(10); + } + } +} \ No newline at end of file diff --git a/Assets/ChillConnect/FGUI/package/Arrow_game/com_bottom.cs.meta b/Assets/ChillConnect/FGUI/package/Arrow_game/com_bottom.cs.meta new file mode 100644 index 0000000..4d27735 --- /dev/null +++ b/Assets/ChillConnect/FGUI/package/Arrow_game/com_bottom.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0a31f5be9910fb94da64f7e655d673f6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ChillConnect/Manager/HallManager.cs b/Assets/ChillConnect/Manager/HallManager.cs index 1248a8e..f66e320 100644 --- a/Assets/ChillConnect/Manager/HallManager.cs +++ b/Assets/ChillConnect/Manager/HallManager.cs @@ -79,37 +79,14 @@ namespace ChillConnect { lang = "en"; } - Debug.Log(ConfigSystem.GetConfig().ExchangeModeToggle + "//////////////////////"); - //初始化商品 - // PurchasingManager.Instance.InitProduct(); - var appleData = new ApplePayData - { - sku = "", - amount = 0, - currency = "USD", - shopName = "", - type = "" - }; - // ApplePayManager.Instance.InitProduct(ConfigSystem.GetConfig().DataList, - // ConfigManager.GameConfig.packageName, PurchasingManager.ApplePaySuccessCallback(appleData)); - - Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig().DataList)); - UIManager.Instance.SetSwitchLanguage(lang); + // UIManager.Instance.SetSwitchLanguage(lang); EnterHall(true); isGameStart = true; TrackKit.TrackLoginFunnel(LoginFunnelEventType.EnterHall); - // Debug.Log("?????????????????" + PurchasingManager.GetPaySku(PayType.pack_reward)); - // Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig().DataList)); - // bool enterGame = CommonHelper.GetBoolByChance(ConfigSystem.GetConfig().roomrate / 100f); - // if (GameHelper.IsGiftSwitch() && enterGame) - // { - // EnterGame(enterGame); - // } - // DOVirtual.DelayedCall(1f, PurchasingManager.StartPay); } private void SetSoundVolume() @@ -130,50 +107,46 @@ namespace ChillConnect UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RewardAniUI_Close); AudioManager.Instance.StopBGM(); AudioManager.Instance.PlayBGM(AudioConst.MainBg); - // UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Open); + + UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ArrowGameUI_Open); - if (GameHelper.IsGiftSwitch() && (obj != null)) - { - int h5rate = GameHelper.GetCommonModel().loginhallrate; - int roomrate = GameHelper.GetCommonModel().roomrate; - // if (UnityEngine.Random.Range(1, 100) < h5rate) { - // UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Open); - // } else - if (UnityEngine.Random.Range(1, 100) < roomrate) - {//进入玩法 - - GameHelper.is_first_login = false; - // OnClickPlay(); - if (!SaveData.GetSaveObject().have_slot && (DateTime.Now.Day != PlayerPrefs.GetInt("off_new", 0))) - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Open); - // UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddviewnewUI_Open); - PlayerPrefs.SetInt("off_new", DateTime.Now.Day); - } - if (!SaveData.GetSaveObject().have_slot && UnityEngine.Random.Range(0, 100) < ConfigSystem.GetConfig().BonusInside) - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Open); - // UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddviewnewUI_Open); - } - else - { - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RainPlayUI_Open, true); - - } - } - else - { - GameHelper.is_first_login = false; - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Open, true); - } - - - } - else - { - GameHelper.is_first_login = false; - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Open); - } + // if (GameHelper.IsGiftSwitch() && (obj != null)) + // { + // int h5rate = GameHelper.GetCommonModel().loginhallrate; + // int roomrate = GameHelper.GetCommonModel().roomrate; + // // if (UnityEngine.Random.Range(1, 100) < h5rate) { + // // UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Open); + // // } else + // if (UnityEngine.Random.Range(1, 100) < roomrate) + // {//进入玩法 + // + // GameHelper.is_first_login = false; + // if (!SaveData.GetSaveObject().have_slot && (DateTime.Now.Day != PlayerPrefs.GetInt("off_new", 0))) + // { + // UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Open); + // PlayerPrefs.SetInt("off_new", DateTime.Now.Day); + // } + // if (!SaveData.GetSaveObject().have_slot && UnityEngine.Random.Range(0, 100) < ConfigSystem.GetConfig().BonusInside) + // { + // UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Open); + // } + // else + // { + // UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RainPlayUI_Open, true); + // + // } + // } + // else + // { + // GameHelper.is_first_login = false; + // UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Open, true); + // } + // } + // else + // { + // GameHelper.is_first_login = false; + // UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MainUI_Open); + // } if (GameHelper.IsGiftSwitch()) UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BroadcastUI_Open); diff --git a/Assets/Resources/ChillConnectAssets/FGUI/Arrow_Theme_atlas0.png b/Assets/Resources/ChillConnectAssets/FGUI/Arrow_Theme_atlas0.png new file mode 100644 index 0000000..9b9f624 Binary files /dev/null and b/Assets/Resources/ChillConnectAssets/FGUI/Arrow_Theme_atlas0.png differ diff --git a/Assets/Resources/ChillConnectAssets/FGUI/Arrow_Theme_atlas0.png.meta b/Assets/Resources/ChillConnectAssets/FGUI/Arrow_Theme_atlas0.png.meta new file mode 100644 index 0000000..2d630cc --- /dev/null +++ b/Assets/Resources/ChillConnectAssets/FGUI/Arrow_Theme_atlas0.png.meta @@ -0,0 +1,153 @@ +fileFormatVersion: 2 +guid: 5caaca25ac368254699f1685f8370171 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ChillConnectAssets/FGUI/Arrow_Theme_fui.bytes b/Assets/Resources/ChillConnectAssets/FGUI/Arrow_Theme_fui.bytes new file mode 100644 index 0000000..b443a33 Binary files /dev/null and b/Assets/Resources/ChillConnectAssets/FGUI/Arrow_Theme_fui.bytes differ diff --git a/Assets/Resources/ChillConnectAssets/FGUI/Arrow_Theme_fui.bytes.meta b/Assets/Resources/ChillConnectAssets/FGUI/Arrow_Theme_fui.bytes.meta new file mode 100644 index 0000000..df24950 --- /dev/null +++ b/Assets/Resources/ChillConnectAssets/FGUI/Arrow_Theme_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b970ecefd0f06b14eba9bdb7d0caed38 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ChillConnectAssets/FGUI/Arrow_game_atlas0.png b/Assets/Resources/ChillConnectAssets/FGUI/Arrow_game_atlas0.png index 4ad7460..43c611e 100644 Binary files a/Assets/Resources/ChillConnectAssets/FGUI/Arrow_game_atlas0.png and b/Assets/Resources/ChillConnectAssets/FGUI/Arrow_game_atlas0.png differ diff --git a/Assets/Resources/ChillConnectAssets/FGUI/Arrow_game_fui.bytes b/Assets/Resources/ChillConnectAssets/FGUI/Arrow_game_fui.bytes index 23de1c5..ef26749 100644 Binary files a/Assets/Resources/ChillConnectAssets/FGUI/Arrow_game_fui.bytes and b/Assets/Resources/ChillConnectAssets/FGUI/Arrow_game_fui.bytes differ diff --git a/Assets/Scenes/MainScene.unity b/Assets/Scenes/MainScene.unity index fe95614..fff95a6 100644 --- a/Assets/Scenes/MainScene.unity +++ b/Assets/Scenes/MainScene.unity @@ -137,53 +137,6 @@ MonoScript: m_ClassName: TimersEngine m_Namespace: FairyGUI m_AssemblyName: ---- !u!1 &284312442 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 284312443} - - component: {fileID: 284312444} - m_Layer: 0 - m_Name: game_parent - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &284312443 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 284312442} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 100} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 477787391} - - {fileID: 1442936685} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &284312444 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 284312442} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9fb9475b4182b354b84f97ae3ed0a002, type: 3} - m_Name: - m_EditorClassIdentifier: - orthoCamera: {fileID: 0} --- !u!1 &436078218 GameObject: m_ObjectHideFlags: 1 @@ -243,90 +196,6 @@ MonoScript: m_ClassName: TimersEngine m_Namespace: FairyGUI m_AssemblyName: ---- !u!1 &477787390 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 477787391} - - component: {fileID: 477787392} - m_Layer: 0 - m_Name: game_bg1 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &477787391 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 477787390} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -1, z: 402} - m_LocalScale: {x: 5.2, y: 5.8, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 284312443} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!212 &477787392 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 477787390} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: 21300000, guid: f6b8d95f4949345f4975e15248f9bd3f, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 10.8, y: 15.67} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 --- !u!1001 &538671978 PrefabInstance: m_ObjectHideFlags: 0 @@ -351,6 +220,10 @@ PrefabInstance: propertyPath: m_AnchorMax.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 22426080, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 22428984, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3} propertyPath: m_AnchorMax.y value: 0 @@ -1134,90 +1007,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 36de1e54129c45dc8fc672793fee00fe, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1 &1442936684 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1442936685} - - component: {fileID: 1442936686} - m_Layer: 0 - m_Name: card_bg - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1442936685 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1442936684} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.2563, y: -34.2, z: 401} - m_LocalScale: {x: 5.2, y: 5.2, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 284312443} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!212 &1442936686 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1442936684} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: 21300000, guid: 4379ab768be8240c1b45495c00e949c8, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 1 - m_Size: {x: 10.4, y: 1.82} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 --- !u!115 &1561525481 MonoScript: m_ObjectHideFlags: 0 @@ -1418,7 +1207,6 @@ SceneRoots: - {fileID: 1667672680} - {fileID: 1342262645} - {fileID: 538671978} - - {fileID: 284312443} - {fileID: 1843985308} - {fileID: 826922254} - {fileID: 1852569256} diff --git a/Assets/Scripts/DataMgr/DataKeys.cs b/Assets/Scripts/DataMgr/DataKeys.cs index 576d9f0..cc84201 100644 --- a/Assets/Scripts/DataMgr/DataKeys.cs +++ b/Assets/Scripts/DataMgr/DataKeys.cs @@ -38,4 +38,6 @@ public static partial class DataKeys public const string ApplePayTransactionID = "ApplePayTransactionID"; //ios购买后的非消耗性订单id public const string NewWatchCd = "NewWatchCd"; public const string ArrowResultLevel = "ArrowResultLevel"; //箭头游戏的结算等级(1:免费,0:看广告) + public const string ArrowDarkTheme = "ArrowDarkTheme"; //箭头游戏的黑夜模式(1:开启,0:关闭) + public const string ArrowTheme = "ArrowTheme"; //箭头游戏的主题(0:黑色 1:虫子 2:彩色) } diff --git a/Assets/Scripts/DataMgr/DataMgr.cs b/Assets/Scripts/DataMgr/DataMgr.cs index b1ba311..6af0fea 100644 --- a/Assets/Scripts/DataMgr/DataMgr.cs +++ b/Assets/Scripts/DataMgr/DataMgr.cs @@ -74,6 +74,8 @@ public static partial class DataMgr public static DataStorage LevelData = new(DataKeys.LevelData, cloudSave: false); public static DataStorage AvailableDiceRolls = BindDataStorage(DataKeys.AvailableDiceRolls); public static DataStorage ArrowResultLevel = BindDataStorage(DataKeys.ArrowResultLevel,@default: 1); + public static DataStorage ArrowDarkTheme = BindDataStorage(DataKeys.ArrowDarkTheme,@default: 1); + public static DataStorage ArrowTheme = BindDataStorage(DataKeys.ArrowTheme,@default: 0); #endregion diff --git a/Assets/Scripts/ModuleManager/CtrlConst.cs b/Assets/Scripts/ModuleManager/CtrlConst.cs index 373ce82..299b30c 100644 --- a/Assets/Scripts/ModuleManager/CtrlConst.cs +++ b/Assets/Scripts/ModuleManager/CtrlConst.cs @@ -57,6 +57,7 @@ namespace ChillConnect public const string StatementViewCtrl = "StatementViewCtrl"; public const string ArrowGameCtrl = "ArrowGameCtrl"; public const string GameAgainCtrl = "GameAgainCtrl"; + public const string ArrowThemeCtrl = "ArrowThemeCtrl"; } } \ No newline at end of file diff --git a/Assets/Scripts/ModuleManager/ModelConst.cs b/Assets/Scripts/ModuleManager/ModelConst.cs index 568b195..6fc627f 100644 --- a/Assets/Scripts/ModuleManager/ModelConst.cs +++ b/Assets/Scripts/ModuleManager/ModelConst.cs @@ -57,6 +57,7 @@ namespace ChillConnect public const string H5Model = "H5Model"; public const string ArrowGameModel = "ArrowGameModel"; public const string GameAgainModel = "GameAgainModel"; + public const string ArrowThemeModel = "ArrowThemeModel"; } } \ No newline at end of file diff --git a/Assets/Scripts/ModuleManager/ModuleManagerRegister.cs b/Assets/Scripts/ModuleManager/ModuleManagerRegister.cs index 9223bbd..972d1d0 100644 --- a/Assets/Scripts/ModuleManager/ModuleManagerRegister.cs +++ b/Assets/Scripts/ModuleManager/ModuleManagerRegister.cs @@ -60,6 +60,7 @@ namespace ChillConnect moduleManager.AddModel(ModelConst.H5Model, new H5Model()); moduleManager.AddModel(ModelConst.ArrowGameModel, new ArrowGameModel()); moduleManager.AddModel(ModelConst.GameAgainModel, new GameAgainModel()); + moduleManager.AddModel(ModelConst.ArrowThemeModel, new ArrowThemeModel()); } @@ -118,6 +119,7 @@ namespace ChillConnect moduleManager.AddUICtrl(UICtrlConst.H5UICtrl, new H5UICtrl()); moduleManager.AddUICtrl(UICtrlConst.ArrowGameUICtrl, new ArrowGameUICtrl()); moduleManager.AddUICtrl(UICtrlConst.GameAgainUICtrl, new GameAgainUICtrl()); + moduleManager.AddUICtrl(UICtrlConst.ArrowThemeUICtrl, new ArrowThemeUICtrl()); @@ -179,6 +181,7 @@ namespace ChillConnect moduleManager.AddCtrl(CtrlConst.H5Ctrl, new H5Ctrl()); moduleManager.AddCtrl(CtrlConst.ArrowGameCtrl, new ArrowGameCtrl()); moduleManager.AddCtrl(CtrlConst.GameAgainCtrl, new GameAgainCtrl()); + moduleManager.AddCtrl(CtrlConst.ArrowThemeCtrl, new ArrowThemeCtrl()); } @@ -238,6 +241,7 @@ namespace ChillConnect moduleManager.AddUIType(UIConst.H5UI, typeof(H5UI)); moduleManager.AddUIType(UIConst.ArrowGameUI, typeof(ArrowGameUI)); moduleManager.AddUIType(UIConst.GameAgainUI, typeof(GameAgainUI)); + moduleManager.AddUIType(UIConst.ArrowThemeUI, typeof(ArrowThemeUI)); } } diff --git a/Assets/Scripts/ModuleManager/UIConst.cs b/Assets/Scripts/ModuleManager/UIConst.cs index 9d096dd..5034af7 100644 --- a/Assets/Scripts/ModuleManager/UIConst.cs +++ b/Assets/Scripts/ModuleManager/UIConst.cs @@ -56,6 +56,7 @@ namespace ChillConnect public const string StatementViewUI = "StatementViewUI"; public const string ArrowGameUI = "ArrowGameUI"; public const string GameAgainUI = "GameAgainUI"; + public const string ArrowThemeUI = "ArrowThemeUI"; } } \ No newline at end of file diff --git a/Assets/Scripts/ModuleManager/UICtrlConst.cs b/Assets/Scripts/ModuleManager/UICtrlConst.cs index 0199bf3..40e3187 100644 --- a/Assets/Scripts/ModuleManager/UICtrlConst.cs +++ b/Assets/Scripts/ModuleManager/UICtrlConst.cs @@ -57,6 +57,7 @@ namespace ChillConnect public const string StatementViewUICtrl = "StatementViewUICtrl"; public const string ArrowGameUICtrl = "ArrowGameUICtrl"; public const string GameAgainUICtrl = "GameAgainUICtrl"; + public const string ArrowThemeUICtrl = "ArrowThemeUICtrl"; } } \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ArrowGame/ArrowGameUI.cs b/Assets/Scripts/ModuleUI/ArrowGame/ArrowGameUI.cs index 9e5da4a..438fc03 100644 --- a/Assets/Scripts/ModuleUI/ArrowGame/ArrowGameUI.cs +++ b/Assets/Scripts/ModuleUI/ArrowGame/ArrowGameUI.cs @@ -71,7 +71,8 @@ namespace ChillConnect private ArrowConfig _currentTipArrow; // 手指图标偏移(微调位置) private readonly Vector2 _fingerOffset = new Vector2(-60, -60); - + // 所有网格圆点实例列表,用于批量改色/清理 + private List _gridDotList = new List(); #region 缩放、拖拽、滑动条 全局变量 // 缩放阈值(滑动条左右边界对应这两个值) @@ -348,16 +349,16 @@ namespace ChillConnect ui.text_level.SetVar("lv", GameHelper.GetLevel().ToString()).FlushVars(); - // 关闭按钮 - ui.btn_close.SetClick(() => { CtrlCloseUI(); }); - ui.btn_clear.SetClick(OnClickDeleteItem); - ui.btn_hint.SetClick(OnClickHint); + // 按钮点击事件绑定 + OnBtnClickBindEvent(); + + _fingerTipObj = com_finger.CreateInstance(); _viewContainer.AddChild(_fingerTipObj); _fingerTipObj.visible = false; _currentTipArrow = null; - _zoomSlider = ui.zoomSlide; + _zoomSlider = ui.com_bottom.zoomSlide; // 2. 绑定滑动条拖动回调 _zoomSlider.onChanged.Add(OnZoomSliderChange); // 3. 容器初始缩放、位置 @@ -429,6 +430,24 @@ namespace ChillConnect #endregion #region UI相关 + + private void OnBtnClickBindEvent() + { + ui.btn_close.SetClick(CtrlCloseUI); + ui.com_bottom.btn_clear.SetClick(OnClickDeleteItem); + ui.com_bottom.btn_hint.SetClick(OnClickHint); + + ui.com_bottom.btn_skin.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.ArrowThemeUI_Open); }); + + ui.btn_petty.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.PettyAwardUI_Open); }); + + ui.btn_signin.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.SignInUI_Open); }); + + ui.btn_statement.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.StatementViewUI_Open); }); + + ui.btn_saveingpot.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.SaveingPotUI_Open); }); + } + /// /// 切换模式 默认黑夜模式 /// @@ -442,8 +461,31 @@ namespace ChillConnect } ui.mode.selectedIndex = idx; + + // 同步更新网格圆点颜色 + bool isDayMode = idx == 1; + UpdateGridDotColor(isDayMode); + } + /// + /// 批量设置网格圆点颜色(随昼夜模式切换) + /// + /// true=白天模式,false=黑夜模式 + private void UpdateGridDotColor(bool isDay) + { + if (_gridDotList == null || _gridDotList.Count == 0) + return; + + // 色值映射:白天#2c3a62,黑夜#d4e3f2 + string colorHex = isDay ? "#2c3a62" : "#d4e3f2"; + ColorUtility.TryParseHtmlString(colorHex, out Color targetColor); + + foreach (var dot in _gridDotList) + { + if (dot == null) continue; + + dot.point.color = targetColor; + } } - #endregion @@ -642,10 +684,13 @@ namespace ChillConnect var pos = RowColToPos(r, c); dot.SetPosition(pos.x, pos.y, 0); _viewContainer.AddChild(dot); + // 加入列表统一管理 + _gridDotList.Add(dot); + } } - // ========= 新增:网格绘制完成后,设置居中缩放轴心 ========= + // ========= 网格绘制完成后,设置居中缩放轴心 ========= CalculateGridCenter(cfg); SetViewPivotToGridCenter(); } @@ -1469,6 +1514,19 @@ namespace ChillConnect private void ClearAllDynamicObj() { if (_levelConfig == null || _viewContainer == null) return; + + // 销毁网格圆点 + foreach (var dot in _gridDotList) + { + if (dot != null) + { + _viewContainer.RemoveChild(dot); + dot.Dispose(); + } + } + _gridDotList.Clear(); + + foreach (var arrow in _levelConfig.arrows) { if (arrow.arrowObj != null) diff --git a/Assets/Scripts/ModuleUI/ArrowTheme.meta b/Assets/Scripts/ModuleUI/ArrowTheme.meta new file mode 100644 index 0000000..130fe12 --- /dev/null +++ b/Assets/Scripts/ModuleUI/ArrowTheme.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 19deb03247c2420ea0ea24e4b9078852 +timeCreated: 1781573811 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeCtrl.cs b/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeCtrl.cs new file mode 100644 index 0000000..cc27c9c --- /dev/null +++ b/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeCtrl.cs @@ -0,0 +1,41 @@ +namespace ChillConnect +{ + 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 + } +} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeCtrl.cs.meta b/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeCtrl.cs.meta new file mode 100644 index 0000000..c8639b9 --- /dev/null +++ b/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeCtrl.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e50273fc8b5c4fd28617651e820de81c +timeCreated: 1781573811 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeModel.cs b/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeModel.cs new file mode 100644 index 0000000..d17f055 --- /dev/null +++ b/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeModel.cs @@ -0,0 +1,43 @@ +namespace ChillConnect +{ + 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 + } +} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeModel.cs.meta b/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeModel.cs.meta new file mode 100644 index 0000000..098840d --- /dev/null +++ b/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeModel.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: cf2b28aa9d18433f9e27343cfcab577d +timeCreated: 1781573811 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeUI.cs b/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeUI.cs new file mode 100644 index 0000000..b59a2a0 --- /dev/null +++ b/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeUI.cs @@ -0,0 +1,141 @@ +using System; +using FGUI.Arrow_game; +using FGUI.Arrow_Theme; + +namespace ChillConnect +{ + 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() + { + + } + // + protected override void OnBind() + { + ui = baseUI as com_theme; + } + private SuccessData successData_; + + protected override void OnOpenBefore(object args) + { + 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; + }); + + ui.btn_close.SetClick(() => + { + CtrlCloseUI(); + }); + } + + private void SetBtnClick(int index) + { + DataMgr.ArrowTheme.Value = index; + SetBtnState(); + } + + 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 = 1; + ((btn_green)ui.btn_worm).state.selectedIndex = 0; + ((btn_green)ui.btn_colours).state.selectedIndex = 0; + 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 = 0; + ((btn_green)ui.btn_worm).state.selectedIndex = 1; + ((btn_green)ui.btn_colours).state.selectedIndex = 0; + 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 = 0; + ((btn_green)ui.btn_worm).state.selectedIndex = 0; + ((btn_green)ui.btn_colours).state.selectedIndex = 1; + 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; + + } +} diff --git a/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeUI.cs.meta b/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeUI.cs.meta new file mode 100644 index 0000000..dcbcd4c --- /dev/null +++ b/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeUI.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 730d3bd4697242e9a28a7f9b2933bcbb +timeCreated: 1781573811 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeUICtrl.cs b/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeUICtrl.cs new file mode 100644 index 0000000..b7c1417 --- /dev/null +++ b/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeUICtrl.cs @@ -0,0 +1,87 @@ +using DG.Tweening; + +namespace ChillConnect +{ + 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 + } +} \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeUICtrl.cs.meta b/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeUICtrl.cs.meta new file mode 100644 index 0000000..3be5eb4 --- /dev/null +++ b/Assets/Scripts/ModuleUI/ArrowTheme/ArrowThemeUICtrl.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f49d5a3813264e589acb43f743d50d24 +timeCreated: 1781573811 \ No newline at end of file diff --git a/Assets/Scripts/ModuleUI/Hall/HallUI.cs b/Assets/Scripts/ModuleUI/Hall/HallUI.cs index 08bd6dd..f18d1de 100644 --- a/Assets/Scripts/ModuleUI/Hall/HallUI.cs +++ b/Assets/Scripts/ModuleUI/Hall/HallUI.cs @@ -599,8 +599,7 @@ namespace ChillConnect }); ui.btn_setting.SetClick(() => { - // UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PersonViewUI_Open); - UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ArrowGameUI_Open); + UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PersonViewUI_Open); }); } private void OnClickTask(bool isLevel) diff --git a/Assets/Scripts/Register/UIManagerRegister.cs b/Assets/Scripts/Register/UIManagerRegister.cs index 8f303b0..6f10ef2 100644 --- a/Assets/Scripts/Register/UIManagerRegister.cs +++ b/Assets/Scripts/Register/UIManagerRegister.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using FGUI.AddCell_12; using FGUI.Arrow_game; +using FGUI.Arrow_Theme; using FGUI.bkg_jilu; using FGUI.bkg_reward_new; using FGUI.Coins_101; @@ -72,6 +73,7 @@ namespace ChillConnect ZM_PettyBinder.BindAll(); ZM_H5_15Binder.BindAll(); Arrow_gameBinder.BindAll(); + Arrow_ThemeBinder.BindAll(); } public static void AutoRegisterCommonPackages()