This commit is contained in:
2026-05-15 16:15:09 +08:00
commit dd3b97bb48
4515 changed files with 1165044 additions and 0 deletions
@@ -0,0 +1,25 @@
using BingoBrain.Core;
namespace BingoBrain
{
public class ReadyBingoCtrl : BaseCtrl
{
public static ReadyBingoCtrl Instance { get; private set; }
private ReadyBingoModel model;
#region
protected override void OnInit()
{
Instance = this;
}
protected override void OnDispose()
{
Instance = null;
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a704f2f27408453e9289cc0dbffc3b70
timeCreated: 1680253921
@@ -0,0 +1,23 @@
using BingoBrain.Core;
namespace BingoBrain
{
public class ReadyBingoModel : BaseModel
{
#region
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
protected override void OnReset()
{
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a51548dcf5b847b99d0574eec95ee680
timeCreated: 1680253921
@@ -0,0 +1,139 @@
using FairyGUI;
using UnityEngine;
using BingoBrain.Core;
using BingoBrain.HotFix;
using Object = UnityEngine.Object;
using DG.Tweening;
using System.Collections;
namespace BingoBrain
{
public class ReadyBingoUI : BaseUI
{
private ReadyBingoUICtrl ctrl;
private ReadyBingoModel model;
private FGUI.JLoading.com_loading ui;
protected GProgressBar pb_loading;
public ReadyBingoUI(ReadyBingoUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.ReadyBingoUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "JLoading";
uiInfo.assetName = "com_loading";
uiInfo.layerType = UILayerType.Loading;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = false;
}
#region
protected override void OnInit()
{
}
protected override void OnClose()
{
}
protected override void OnBind()
{
ui = baseUI as FGUI.JLoading.com_loading;
}
protected override void OnOpenBefore(object args)
{
UICtrlDispatcher.Instance.Dispatch(SkinInfo.ReadyBingoyUI_Open);
ui.pb_loading.max = 100;
ui.pb_loading.value = 0;
if (!GameHelper.IsConnect())
{
return;
}
IsfvKit.StartCoroutine(SetProgress());
var splashCanvas = GameObject.Find("SplashCanvas");
if (splashCanvas != null)
{
splashCanvas.SetActive(false);
Object.Destroy(splashCanvas);
}
}
private Tweener tweener;
public IEnumerator SetProgress()
{
tweener = DOTween.To(() => ui.pb_loading.value,
x => ui.pb_loading.value = x, 97, 3.0f);
yield return tweener;
}
protected override void OnOpen(object args)
{
}
#endregion
private void Reconnection(object obj = null)
{
IsfvKit.StartCoroutine(SetProgress());
}
#region
protected override void AddListener()
{
GameDispatcher.Instance.AddListener(BingoInfo.UpdateHotFixMax, OnUpdateHotFixMax);
GameDispatcher.Instance.AddListener(BingoInfo.UpdateHotFixProgress, OnUpdateHotFixProgress);
GameDispatcher.Instance.AddListener(BingoInfo.Network_reconnection, Reconnection);
}
protected override void RemoveListener()
{
GameDispatcher.Instance.RemoveListener(BingoInfo.UpdateHotFixMax, OnUpdateHotFixMax);
GameDispatcher.Instance.RemoveListener(BingoInfo.UpdateHotFixProgress, OnUpdateHotFixProgress);
GameDispatcher.Instance.RemoveListener(BingoInfo.Network_reconnection, Reconnection);
}
#endregion
private bool isAgree = true;
public void CheckAgree()
{
if (!isAgree) return;
ctrl.CloseUI();
}
bool isShowed = false;
private void OnUpdateHotFixMax(object obj)
{
if (obj == null) return;
var max = (int)obj;
ui.pb_loading.max = max;
}
private void OnUpdateHotFixProgress(object obj)
{
if (obj != null)
{
var value = (int)obj;
pb_loading.value = value;
}
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e3556cff2a2a4a368eea3eba4a7f190b
timeCreated: 1680253921
@@ -0,0 +1,76 @@
using BingoBrain.Core;
namespace BingoBrain
{
public class ReadyBingoUICtrl : BaseUICtrl
{
private ReadyBingoUI ui;
private ReadyBingoModel model;
private uint openUIMsg = 0;
private uint closeUIMsg = 0;
#region
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new ReadyBingoUI(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()
{
AppDispatcher.Instance.AddListener(CsjInfoC.UI_DisplayLoadingUI, OpenUI);
AppDispatcher.Instance.AddListener(CsjInfoC.UI_HideLoadingUI, OnHideLoading);
}
protected override void RemoveListener()
{
AppDispatcher.Instance.RemoveListener(CsjInfoC.UI_DisplayLoadingUI, OpenUI);
AppDispatcher.Instance.RemoveListener(CsjInfoC.UI_HideLoadingUI, OnHideLoading);
}
#endregion
private void OnHideLoading(object obj)
{
if (ui == null) return;
ui.CheckAgree();
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: c193e90729ed4fcd8c9d5a1bdd52518e
timeCreated: 1680253921