fix:1、修改bug
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using FGUI.Arrow_game;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
@@ -21,6 +22,9 @@ namespace ChillConnect
|
||||
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()
|
||||
@@ -39,7 +43,8 @@ namespace ChillConnect
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
InitView();
|
||||
if (args != null)
|
||||
InitView((int)args);
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
@@ -55,16 +60,23 @@ namespace ChillConnect
|
||||
{
|
||||
}
|
||||
|
||||
private void InitView()
|
||||
private void InitView(int type)
|
||||
{
|
||||
|
||||
int state = type;
|
||||
Debug.Log($"tips state = {state} ");
|
||||
// 0 提示 1 删除道具
|
||||
ui.state.selectedIndex = state;
|
||||
|
||||
ui.btn_watch.SetClick(() =>
|
||||
{
|
||||
GameHelper.ShowVideoAd("deletePop", isSuccess =>
|
||||
string idStr = state == 1 ? "deletePop" : "HintPop";
|
||||
GameHelper.ShowVideoAd(idStr, isSuccess =>
|
||||
{
|
||||
if (isSuccess)
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.SetDelete);
|
||||
Debug.Log($"isSuccess tips state = {state} ");
|
||||
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.UseProps, state);
|
||||
CtrlCloseUI();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user