diff --git a/Assets/BingoBrain/FGUI/Package/JMain/com_main.cs b/Assets/BingoBrain/FGUI/Package/JMain/com_main.cs index 6c14d96..f8d9727 100644 --- a/Assets/BingoBrain/FGUI/Package/JMain/com_main.cs +++ b/Assets/BingoBrain/FGUI/Package/JMain/com_main.cs @@ -22,6 +22,7 @@ namespace FGUI.JMain public GButton btn_cashout; public btn_petty btn_petty; public GButton btn_play; + public GButton btn_wb; public const string URL = "ui://qw9x6rf3lbaa0"; public static com_main CreateInstance() @@ -48,6 +49,7 @@ namespace FGUI.JMain btn_cashout = (GButton)GetChildAt(15); btn_petty = (btn_petty)GetChildAt(16); btn_play = (GButton)GetChildAt(17); + btn_wb = (GButton)GetChildAt(18); } } } \ No newline at end of file diff --git a/Assets/BingoBrain/FGUI/Package/webview.meta b/Assets/BingoBrain/FGUI/Package/webview.meta new file mode 100644 index 0000000..15f15ef --- /dev/null +++ b/Assets/BingoBrain/FGUI/Package/webview.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6f8424ae2ab97194d909b2bccc341f9e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BingoBrain/FGUI/Package/webview/com_webview.cs b/Assets/BingoBrain/FGUI/Package/webview/com_webview.cs new file mode 100644 index 0000000..096c41d --- /dev/null +++ b/Assets/BingoBrain/FGUI/Package/webview/com_webview.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.webview +{ + public partial class com_webview : GComponent + { + public GButton btn_close; + public const string URL = "ui://hb7tci4zogc90"; + + public static com_webview CreateInstance() + { + return (com_webview)UIPackage.CreateObject("webview", "com_webview"); + } + + public override void ConstructFromXML(XML xml) + { + base.ConstructFromXML(xml); + + btn_close = (GButton)GetChildAt(1); + } + } +} \ No newline at end of file diff --git a/Assets/BingoBrain/FGUI/Package/webview/com_webview.cs.meta b/Assets/BingoBrain/FGUI/Package/webview/com_webview.cs.meta new file mode 100644 index 0000000..758bbab --- /dev/null +++ b/Assets/BingoBrain/FGUI/Package/webview/com_webview.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8ddb21d4dd804e24d9ca9db4af345923 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BingoBrain/FGUI/Package/webview/webviewBinder.cs b/Assets/BingoBrain/FGUI/Package/webview/webviewBinder.cs new file mode 100644 index 0000000..4754081 --- /dev/null +++ b/Assets/BingoBrain/FGUI/Package/webview/webviewBinder.cs @@ -0,0 +1,14 @@ +/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ + +using FairyGUI; + +namespace FGUI.webview +{ + public class webviewBinder + { + public static void BindAll() + { + UIObjectFactory.SetPackageItemExtension(com_webview.URL, typeof(com_webview)); + } + } +} \ No newline at end of file diff --git a/Assets/BingoBrain/FGUI/Package/webview/webviewBinder.cs.meta b/Assets/BingoBrain/FGUI/Package/webview/webviewBinder.cs.meta new file mode 100644 index 0000000..7ec72b4 --- /dev/null +++ b/Assets/BingoBrain/FGUI/Package/webview/webviewBinder.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4cf157248dc475948bd1df252550e3c2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BingoBrain/Model/Info/SkinInfot.cs b/Assets/BingoBrain/Model/Info/SkinInfot.cs index b888875..1e36e3e 100644 --- a/Assets/BingoBrain/Model/Info/SkinInfot.cs +++ b/Assets/BingoBrain/Model/Info/SkinInfot.cs @@ -133,6 +133,7 @@ namespace BingoBrain public static uint RecordViewUI_Close = ++cursor_OpenClose; public static uint PettyAwardUI_Open = ++cursor_OpenClose; public static uint PettyAwardUI_Close = ++cursor_OpenClose; + } public static partial class UICtrlMsg { diff --git a/Assets/BingoBrain/ModuleBoard/ModuleBoard.cs b/Assets/BingoBrain/ModuleBoard/ModuleBoard.cs index cb230e4..a8828c6 100644 --- a/Assets/BingoBrain/ModuleBoard/ModuleBoard.cs +++ b/Assets/BingoBrain/ModuleBoard/ModuleBoard.cs @@ -47,6 +47,7 @@ namespace BingoBrain moduleBoardk.AddModel(ModelConst.RecordViewModel, new RecordViewModel()); moduleBoardk.AddModel(ModelConst.FirstRewardModel, new FirstRewardModel()); moduleBoardk.AddModel(ModelConst.PettyAwardModel, new PettyAwardModel()); + moduleBoardk.AddModel(ModelConst.H5Model, new H5Model()); } public static void AutoRegisterUIType() @@ -91,6 +92,7 @@ namespace BingoBrain moduleBoardk.AddUIType(UIConst.RecordViewUI, typeof(RecordViewUI)); moduleBoardk.AddUIType(UIConst.FirstRewardUI, typeof(FirstRewardUI)); moduleBoardk.AddUIType(UIConst.PettyAwardUI, typeof(PettyAwardUI)); + moduleBoardk.AddUIType(UIConst.H5UI, typeof(H5UI)); } public static void AutoRegisterCtrl() @@ -136,6 +138,7 @@ namespace BingoBrain moduleBoardk.AddCtrl(CtrlConst.RecordViewCtrl, new RecordViewCtrl()); moduleBoardk.AddCtrl(CtrlConst.FirstRewardCtrl, new FirstRewardCtrl()); moduleBoardk.AddCtrl(CtrlConst.PettyAwardCtrl, new PettyAwardCtrl()); + moduleBoardk.AddCtrl(CtrlConst.H5Ctrl, new H5Ctrl()); } public static void AutoRegisterUICtrl() @@ -181,6 +184,7 @@ namespace BingoBrain moduleBoardk.AddUICtrl(UICtrlConst.RecordViewUICtrl, new RecordViewUICtrl()); moduleBoardk.AddUICtrl(UICtrlConst.FirstRewardUICtrl, new FirstRewardUICtrl()); moduleBoardk.AddUICtrl(UICtrlConst.PettyAwardUICtrl, new PettyAwardUICtrl()); + moduleBoardk.AddUICtrl(UICtrlConst.H5UICtrl, new H5UICtrl()); } } } \ No newline at end of file diff --git a/Assets/BingoBrain/ModuleUI/BingoHall/BingoHallUI.cs b/Assets/BingoBrain/ModuleUI/BingoHall/BingoHallUI.cs index 167b60b..96fbacf 100644 --- a/Assets/BingoBrain/ModuleUI/BingoHall/BingoHallUI.cs +++ b/Assets/BingoBrain/ModuleUI/BingoHall/BingoHallUI.cs @@ -193,6 +193,10 @@ namespace BingoBrain { UICtrlDispatcher.Instance.Dispatch(SkinInfo.PettyAwardUI_Open); }); + ui.btn_wb.SetClick(() => + { + UICtrlDispatcher.Instance.Dispatch(SkinInfo.H5UI_Open); + }); } private void UpdateNextCardBoardTime() diff --git a/Assets/BingoBrain/ModuleUI/H5.meta b/Assets/BingoBrain/ModuleUI/H5.meta new file mode 100644 index 0000000..b0169f6 --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/H5.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ab00c3d5c44ee3d4fa5b2caa5721ae17 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BingoBrain/ModuleUI/H5/H5Ctrl.cs b/Assets/BingoBrain/ModuleUI/H5/H5Ctrl.cs new file mode 100644 index 0000000..0340eaa --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/H5/H5Ctrl.cs @@ -0,0 +1,25 @@ +using BingoBrain.Core; + +namespace BingoBrain +{ + public class H5Ctrl : BaseCtrl + { + public static H5Ctrl Instance { get; private set; } + + private H5Model model; + + #region 生命周期 + protected override void OnInit() + { + Instance = this; + //model = ModuleManager.Instance..GetModel(ModelConst.H5Model) as H5Model; + } + + protected override void OnDispose() + { + Instance = null; + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/BingoBrain/ModuleUI/H5/H5Ctrl.cs.meta b/Assets/BingoBrain/ModuleUI/H5/H5Ctrl.cs.meta new file mode 100644 index 0000000..6cc49aa --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/H5/H5Ctrl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9f0d89ff894a1074494420d446333bfc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BingoBrain/ModuleUI/H5/H5Model.cs b/Assets/BingoBrain/ModuleUI/H5/H5Model.cs new file mode 100644 index 0000000..7c7f80f --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/H5/H5Model.cs @@ -0,0 +1,23 @@ +using BingoBrain.Core; + +namespace BingoBrain +{ + public class H5Model : BaseModel + { + #region 生命周期 + + protected override void OnInit() + { + } + + protected override void OnDispose() + { + } + + protected override void OnReset() + { + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/BingoBrain/ModuleUI/H5/H5Model.cs.meta b/Assets/BingoBrain/ModuleUI/H5/H5Model.cs.meta new file mode 100644 index 0000000..81be39a --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/H5/H5Model.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2ad9b45c44f492b4a97fc9845e2972a8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BingoBrain/ModuleUI/H5/H5UI.cs b/Assets/BingoBrain/ModuleUI/H5/H5UI.cs new file mode 100644 index 0000000..f1f9daa --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/H5/H5UI.cs @@ -0,0 +1,93 @@ +using BingoBrain.Core; +using BingoBrain.HotFix; +using DontConfuse; +using FGUI.ACommon; +using FGUI.webview; +using UnityEngine; + +namespace BingoBrain +{ + public class H5UI : BaseUI + { + private H5UICtrl ctrl; + private H5Model model; + private com_webview ui; + + public H5UI(H5UICtrl ctrl) : base(ctrl) + { + uiName = UIConst.H5UI; + this.ctrl = ctrl; + } + + protected override void SetUIInfo(UIInfo uiInfo) + { + uiInfo.packageName = "webview"; + uiInfo.assetName = "com_webview"; + uiInfo.layerType = UILayerType.Popup; + uiInfo.isNeedOpenAnim = false; + uiInfo.isNeedCloseAnim = false; + uiInfo.isNeedUIMask = true; + } + + #region 生命周期 + protected override void OnInit() + { + //model = ModuleManager.Instance.GetModel(ModelConst.H5Model) as H5Model; + } + + protected override void OnClose() + { + WebviewManager.Instance.setInH5View(false); + WebviewManager.Instance.ShowH5View(false); + } + + protected override void OnBind() + { + ui = baseUI as FGUI.webview.com_webview; + } + + protected override void OnOpenBefore(object args) + { + WebviewManager.Instance.setInH5View(true); + // delayedCall = DOVirtual.DelayedCall(0.3f, () => + // { + WebviewManager.Instance.ShowH5View(true); + ui.btn_close.SetClick(() => + { + UICtrlDispatcher.Instance.Dispatch(SkinInfo.H5UI_Close); + }); + InitView(); + + } + + 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 void InitView() + { + + } + } +} \ No newline at end of file diff --git a/Assets/BingoBrain/ModuleUI/H5/H5UI.cs.meta b/Assets/BingoBrain/ModuleUI/H5/H5UI.cs.meta new file mode 100644 index 0000000..a21dbc3 --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/H5/H5UI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 345404ec69f13b84c9ce0415061b717b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BingoBrain/ModuleUI/H5/H5UICtrl.cs b/Assets/BingoBrain/ModuleUI/H5/H5UICtrl.cs new file mode 100644 index 0000000..cbe8b3c --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/H5/H5UICtrl.cs @@ -0,0 +1,74 @@ +using BingoBrain.Core; +using BingoBrain.HotFix; + +namespace BingoBrain +{ + public class H5UICtrl : BaseUICtrl + { + private H5UI ui; + private H5Model model; + + private uint openUIMsg = SkinInfo.H5UI_Open; + private uint closeUIMsg = SkinInfo.H5UI_Close; + + #region 生命周期 + protected override void OnInit() + { + //model = ModuleManager.Instance.GetModel(ModelConst.H5Model) as H5Model; + } + + protected override void OnDispose() + { + } + + public override void OpenUI(object args = null) + { + if (ui == null) + { + ui = new H5UI(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 + } +} \ No newline at end of file diff --git a/Assets/BingoBrain/ModuleUI/H5/H5UICtrl.cs.meta b/Assets/BingoBrain/ModuleUI/H5/H5UICtrl.cs.meta new file mode 100644 index 0000000..1d141ad --- /dev/null +++ b/Assets/BingoBrain/ModuleUI/H5/H5UICtrl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 74ecd6e2beb102e4e9eee8ad48c987d6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BingoBrain/Register/UIManagerBoard.cs b/Assets/BingoBrain/Register/UIManagerBoard.cs index 1792f19..a710cea 100644 --- a/Assets/BingoBrain/Register/UIManagerBoard.cs +++ b/Assets/BingoBrain/Register/UIManagerBoard.cs @@ -30,6 +30,7 @@ namespace BingoBrain FGUI.Common_01.Common_01Binder.BindAll(); FGUI.bkg_jilu.bkg_jiluBinder.BindAll(); FGUI.ZM_Petty.ZM_PettyBinder.BindAll(); + FGUI.webview.webviewBinder.BindAll(); } public static void AutoRegisterCommonPackages() diff --git a/Assets/BingoBrain/System/Game/JsonSystem.cs b/Assets/BingoBrain/System/Game/JsonSystem.cs index 1429313..cb598be 100644 --- a/Assets/BingoBrain/System/Game/JsonSystem.cs +++ b/Assets/BingoBrain/System/Game/JsonSystem.cs @@ -95,8 +95,8 @@ namespace BingoBrain } //Debug.Log($"[UNITY] needDownloadConfigFile: {needDownloadConfigFile}"); //默默地拉去新配置 - Debug.Log("kkkkkkkkkkkkkkkkkkkkkk" + needDownloadConfigFile); - Debug.Log("kkkkkkkkkkkkkkkkkkkkkk" + savedCfgName); + // Debug.Log("kkkkkkkkkkkkkkkkkkkkkk" + needDownloadConfigFile); + // Debug.Log("kkkkkkkkkkkkkkkkkkkkkk" + savedCfgName); if (needDownloadConfigFile) { diff --git a/Assets/Resources/AssetHotFix/FGUI/JMain_fui.bytes b/Assets/Resources/AssetHotFix/FGUI/JMain_fui.bytes index 97a722c..e609b06 100644 Binary files a/Assets/Resources/AssetHotFix/FGUI/JMain_fui.bytes and b/Assets/Resources/AssetHotFix/FGUI/JMain_fui.bytes differ diff --git a/Assets/Resources/AssetHotFix/FGUI/webview_fui.bytes b/Assets/Resources/AssetHotFix/FGUI/webview_fui.bytes new file mode 100644 index 0000000..97d27ee Binary files /dev/null and b/Assets/Resources/AssetHotFix/FGUI/webview_fui.bytes differ diff --git a/Assets/Resources/AssetHotFix/FGUI/webview_fui.bytes.meta b/Assets/Resources/AssetHotFix/FGUI/webview_fui.bytes.meta new file mode 100644 index 0000000..a87fb1b --- /dev/null +++ b/Assets/Resources/AssetHotFix/FGUI/webview_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6e1daef1efe3e984ead49b3a3b4bf598 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: