fix:1、添加项目
This commit is contained in:
@@ -0,0 +1,142 @@
|
||||
namespace FlowerPower
|
||||
{
|
||||
using System.Collections;
|
||||
using DG.Tweening;
|
||||
using FGUI.P05_Login;
|
||||
using FGUI.P08_Play;
|
||||
using UnityEngine;
|
||||
|
||||
// using FGUI.A000_common;
|
||||
|
||||
public class GameLoginUI : BaseUI
|
||||
{
|
||||
private GameLoginUICtrl ctrl;
|
||||
private GameLoginModel model;
|
||||
private FGUI.P05_Login.com_login_page ui;
|
||||
|
||||
public GameLoginUI(GameLoginUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.GameLoginUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "P05_Login";
|
||||
uiInfo.assetName = "com_login_page";
|
||||
uiInfo.layerType = UILayerType.Normal;
|
||||
}
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
netFbloadBindLogin?.Kill();
|
||||
CommonHelper.FadeOut(ui);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenBgUI_Close);
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.P05_Login.com_login_page;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
InitView();
|
||||
|
||||
var reqData = new RespLoginFunnelData
|
||||
{
|
||||
type = "enterButtonShow",
|
||||
payload = ""
|
||||
};
|
||||
NetworkKit.PostFunnelLogin(reqData);
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
CommonHelper.FadeIn(ui);
|
||||
}
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
}
|
||||
|
||||
private void InitView()
|
||||
{
|
||||
ui.btn_login.SetClick(OnClickBtn, true);
|
||||
|
||||
App.HideLoadingUI();
|
||||
((com_login_privacy)ui.text_privacy_user).text_privacy_user.SetClick(OnClickPrivacy);
|
||||
((com_login_privacy)ui.text_privacy_user).text_privacy_user.onClickLink.Add((content) =>
|
||||
{
|
||||
switch (content.data)
|
||||
{
|
||||
case "link_href":
|
||||
OnClickTerms();
|
||||
break;
|
||||
case "link_href1":
|
||||
OnClickPrivacy();
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Action closeCallback = null;
|
||||
// var meteor = FXManager.Instance.SetFx<SkeletonAnimation>(ui.pla1, Fx_Type.meteor, ref closeCallback);
|
||||
// meteor.state.SetAnimation(0, "liziguang1", true);
|
||||
|
||||
// var login = FXManager.Instance.SetFx<SkeletonAnimation>(ui.pla, Fx_Type.login, ref closeCallback);
|
||||
// login.state.SetAnimation(0, "animation", true);
|
||||
|
||||
// var lantern = FXManager.Instance.SetFx<SkeletonAnimation>(ui.pla1, Fx_Type.lantern, ref closeCallback);
|
||||
// lantern.state.SetAnimation(0, "deng", true);
|
||||
|
||||
ui.btn_space.SetClick(OnclickSpace);
|
||||
ui.lab_int.text = "int: " + MaxADKit.interstitialADUnitID;
|
||||
ui.lab_reward.text = "reward: " + MaxADKit.rewardedADUnitID;
|
||||
ui.lab_key.text = "sdk_key: " + MaxADKit.SDKKey;
|
||||
#if FlowerPowerRelease
|
||||
ui.btn_space.visible = false;
|
||||
ui._group.visible = false;
|
||||
#endif
|
||||
}
|
||||
private void OnclickSpace()
|
||||
{
|
||||
// Debug.Log("OnclickSpace");
|
||||
#if !UNITY_EDITOR
|
||||
MaxSdk.ShowMediationDebugger();
|
||||
#endif
|
||||
}
|
||||
|
||||
private Tween netFbloadBindLogin;
|
||||
|
||||
public void OnClickBtn()
|
||||
{
|
||||
var reqData = new RespLoginFunnelData
|
||||
{
|
||||
type = "enterButtonClick",
|
||||
payload = ""
|
||||
};
|
||||
NetworkKit.PostFunnelLogin(reqData);
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.Game_Start);
|
||||
CtrlCloseUI();
|
||||
}
|
||||
|
||||
private void OnClickPrivacy()
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open);
|
||||
}
|
||||
|
||||
private void OnClickTerms()
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user