bingo 项目提交
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using FairyGUI;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
using FGUI.G008_reward_animal;
|
||||
using DG.Tweening;
|
||||
using FGUI.Common_animal;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class RewardboxUI : BaseUI
|
||||
{
|
||||
private RewardboxUICtrl ctrl;
|
||||
private RewardboxModel model;
|
||||
private FGUI.G008_reward_animal.com_rewardbox ui;
|
||||
|
||||
public RewardboxUI(RewardboxUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.RewardboxUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "G008_reward_animal";
|
||||
uiInfo.assetName = "com_rewardbox";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.RewardboxModel) as RewardboxModel;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
GameHelper.showGameUI = true;
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.G008_reward_animal.com_rewardbox;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
GameHelper.showGameUI = false;
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) (ui.btn_lookad.GetChild("img_saveingpot") as GImage).visible = true;
|
||||
if (GameHelper.IsGiftSwitch()) ui.switchgift.selectedIndex = 1;
|
||||
else ui.switchgift.selectedIndex = 0;
|
||||
(ui.btn_lookad as btn_tabad).color.selectedIndex = 1;
|
||||
float[] cash_array = GameHelper.GetRewardValue(2);
|
||||
ui.btn_lookad.SetClick(() =>
|
||||
{
|
||||
GameHelper.ShowVideoAd("reward_lobby", isSuccess =>
|
||||
{
|
||||
if (isSuccess)
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Ad_success, cash_array[0]);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RewardboxUI_Close);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
ui.btn_close.SetClick(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RewardboxUI_Close);
|
||||
GameHelper.addInterAdnumber();
|
||||
});
|
||||
ui.gold_text.text = string.Format(ui.gold_text.text, cash_array[0]);
|
||||
InitView();
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDisplay(object args)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user