提交工程
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class OpenBgCtrl : BaseCtrl
|
||||
{
|
||||
public static OpenBgCtrl Instance { get; private set; }
|
||||
|
||||
private OpenBgModel model;
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d93c061f221d2524495f19969909b20e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class OpenBgModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e41bf58566c9474418dc04b26ce9d9ef
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using FairyGUI;
|
||||
using FGUI.Img_02;
|
||||
using Spine.Unity;
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class OpenBgUI : BaseUI
|
||||
{
|
||||
private OpenBgUICtrl ctrl;
|
||||
private OpenBgModel model;
|
||||
private com_loadingBg ui;
|
||||
private Action closeCallback;
|
||||
|
||||
public OpenBgUI(OpenBgUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.OpenBgUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "Img_02";
|
||||
uiInfo.assetName = "com_loadingBg";
|
||||
uiInfo.layerType = UILayerType.Background;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
// CommonHelper.FadeOut(ui);
|
||||
}
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
// UICtrlDispatcher.Instance.AddListener(UICtrlMsg.GameLoginUI_Open, OpenLogin);
|
||||
}
|
||||
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
// UICtrlDispatcher.Instance.RemoveListener(UICtrlMsg.GameLoginUI_Open, OpenLogin);
|
||||
}
|
||||
|
||||
private void OpenLogin(object args)
|
||||
{
|
||||
// ui.icon_logo.TweenFade(0, 0.1f);
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as com_loadingBg;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
var sk = FXManager.Instance.SetFx<SkeletonAnimation>(baseUI.GetChild("bg_parent") as GGraph, Fx_Type.fx_login, ref closeCallback);
|
||||
sk.state.SetAnimation(0, "animation", false);
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
// CommonHelper.FadeIn(ui);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 599f5082a5c3c754db1a8fd910cca80a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,72 @@
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class OpenBgUICtrl : BaseUICtrl
|
||||
{
|
||||
private OpenBgUI ui;
|
||||
private OpenBgModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.OpenBgUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.OpenBgUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
// Debug.Log($"open game ui");
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new OpenBgUI(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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2818baa7360f3b449a73a290dc9594c9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user