feat:1、创建项目
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class ArrowTipsCtrl : BaseCtrl
|
||||
{
|
||||
public static ArrowTipsCtrl Instance { get; private set; }
|
||||
|
||||
private ArrowTipsModel model;
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d070658caacf42a79ba55d6ac90d78a6
|
||||
timeCreated: 1781677288
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class ArrowTipsModel : BaseModel
|
||||
{
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4051b0d4995a4a1399d64e95c6c582f1
|
||||
timeCreated: 1781677288
|
||||
@@ -0,0 +1,92 @@
|
||||
using System;
|
||||
using FGUI.Arrow_game;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
|
||||
public class ArrowTipsUI : BaseUI
|
||||
{
|
||||
private ArrowTipsUICtrl ctrl;
|
||||
private ArrowTipsModel model;
|
||||
private com_tips ui;
|
||||
|
||||
public ArrowTipsUI(ArrowTipsUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.ArrowTipsUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "Arrow_game";
|
||||
uiInfo.assetName = "com_tips";
|
||||
uiInfo.layerType = UILayerType.Loading;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
uiInfo.isNeedOpenAnim = true;
|
||||
uiInfo.isNeedCloseAnim = true;
|
||||
}
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
|
||||
|
||||
CommonHelper.FadeOut(ui);
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as com_tips;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
|
||||
|
||||
if (args != null)
|
||||
InitView((int)args);
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
CommonHelper.FadeIn(ui);
|
||||
}
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
}
|
||||
|
||||
private void InitView(int type)
|
||||
{
|
||||
int state = type;
|
||||
Debug.Log($"tips state = {state} ");
|
||||
// 0 提示 1 删除道具
|
||||
ui.state.selectedIndex = state;
|
||||
|
||||
ui.btn_watch.SetClick(() =>
|
||||
{
|
||||
string idStr = state == 1 ? "deletePop" : "HintPop";
|
||||
GameHelper.ShowVideoAd(idStr, isSuccess =>
|
||||
{
|
||||
if (isSuccess)
|
||||
{
|
||||
Debug.Log($"isSuccess tips state = {state} ");
|
||||
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.UseProps, state);
|
||||
CtrlCloseUI();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
ui.btn_close.SetClick(CtrlCloseUI);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4737faa4124f48fabc5ef35ef2ff9f2f
|
||||
timeCreated: 1781677288
|
||||
@@ -0,0 +1,60 @@
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class ArrowTipsUICtrl : BaseUICtrl
|
||||
{
|
||||
private ArrowTipsUI ui;
|
||||
private ArrowTipsModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.ArrowTipsUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.ArrowTipsUI_Close;
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new ArrowTipsUI(this);
|
||||
ui.Open(args);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CloseUI(object args = null)
|
||||
{
|
||||
if (ui != null && !ui.isClose)
|
||||
{
|
||||
ui.Close();
|
||||
}
|
||||
|
||||
ui = null;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e1a6be77c1c462a86ed773072d923d3
|
||||
timeCreated: 1781677288
|
||||
Reference in New Issue
Block a user