fix:1、添加项目
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
namespace FlowerPower
|
||||
{
|
||||
public class GuideViewCtrl : BaseCtrl
|
||||
{
|
||||
public static GuideViewCtrl Instance { get; private set; }
|
||||
|
||||
private LoadingModel model;
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e18c0ecd8b19c4f17bad8558599bd9cb
|
||||
timeCreated: 1676622067
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace FlowerPower
|
||||
{
|
||||
public class GuideViewModel : BaseModel
|
||||
{
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b2e866ec6689b49c1beceb9040ac4459
|
||||
timeCreated: 1676622067
|
||||
@@ -0,0 +1,83 @@
|
||||
using DG.Tweening;
|
||||
using System;
|
||||
using FairyGUI;
|
||||
using Spine.Unity;
|
||||
using UnityEngine;
|
||||
|
||||
namespace FlowerPower
|
||||
{
|
||||
|
||||
public class GuideViewUI : BaseUI
|
||||
{
|
||||
private GuideViewUICtrl ctrl;
|
||||
private GuideViewModel model;
|
||||
private FGUI.P22_Guide.com_guide ui;
|
||||
|
||||
protected GProgressBar pb_loading;
|
||||
private Tweener tweener;
|
||||
|
||||
|
||||
protected int currValue;
|
||||
|
||||
public GuideViewUI(GuideViewUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.GuideViewUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "P22_Guide";
|
||||
uiInfo.assetName = "com_guide";
|
||||
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.P22_Guide.com_guide;
|
||||
}
|
||||
private Action closeCallback;
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
TimerHelper.mEasy.AddTimer(0.7f, () =>
|
||||
{
|
||||
ui.btn_new_start.visible = true;
|
||||
var ska = FXManager.Instance.SetFx<SkeletonAnimation>(ui.btn_new_start.GetChild("btn_parent") as GGraph, Fx_Type.fx_btn_start, ref closeCallback);
|
||||
ska.state.SetAnimation(0, "play", true);
|
||||
var finger = FXManager.Instance.SetFx<SkeletonAnimation>(ui.finger_parent, Fx_Type.fx_hand_pre, ref closeCallback);
|
||||
finger.state.SetAnimation(0, "idle", true);
|
||||
});
|
||||
|
||||
|
||||
ui.btn_new_start.SetClick(()=>{
|
||||
PlayerPrefs.SetInt("new_one", 1);
|
||||
|
||||
GameHelper.gameType = 0;
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.OpenGame);
|
||||
CtrlCloseUI();
|
||||
});
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8fbb65019fff4ffd8ba6dbf7b8f985b
|
||||
timeCreated: 1676622067
|
||||
@@ -0,0 +1,71 @@
|
||||
namespace FlowerPower
|
||||
{
|
||||
public class GuideViewUICtrl : BaseUICtrl
|
||||
{
|
||||
private GuideViewUI ui;
|
||||
private GuideViewModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.GuideViewUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.GuideViewUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.GuideViewModel) as GuideViewModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new GuideViewUI(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: 28b4e072880e54052931ad4c90919409
|
||||
timeCreated: 1676622067
|
||||
Reference in New Issue
Block a user