ball 项目提交
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
|
||||
|
||||
namespace BallKingdomCrush
|
||||
{
|
||||
public class UnlockTipsCtrl : BaseCtrl
|
||||
{
|
||||
public static UnlockTipsCtrl Instance { get; private set; }
|
||||
|
||||
private UnlockTipsModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.UnlockTipsModel) as UnlockTipsModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3552f0af8e16e194a8d327c687204be8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
|
||||
namespace BallKingdomCrush
|
||||
{
|
||||
public class UnlockTipsModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57115182c7c181f4bbad03d433b3337d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,142 @@
|
||||
using FGUI.ZM_Common_01;
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using SGModule.NetKit;
|
||||
|
||||
namespace BallKingdomCrush
|
||||
{
|
||||
public class UnlockTipsUI : BaseUI
|
||||
{
|
||||
private UnlockTipsUICtrl ctrl;
|
||||
private UnlockTipsModel model;
|
||||
private FGUI.ZM_Toast_23.com_unclok_tips ui;
|
||||
|
||||
public UnlockTipsUI(UnlockTipsUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.UnlockTipsUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "ZM_Toast_23";
|
||||
uiInfo.assetName = "com_unclok_tips";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.UnlockTipsModel) as UnlockTipsModel;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.ZM_Toast_23.com_unclok_tips;
|
||||
}
|
||||
|
||||
private int _type = 0;
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
if (args == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
_type = (int)args;
|
||||
string key = null;
|
||||
if (_type == 1) key = "unlocked_secret";
|
||||
else if (_type == 2) key = "unlocked_live";
|
||||
else if (_type == 3) key = "unlocked_assitant";
|
||||
|
||||
ui.text_tips.text = Language.GetContent(key); ;
|
||||
|
||||
|
||||
if (_type == 1)
|
||||
{
|
||||
if (DataMgr.IsUnlockSecret.Value == 0)
|
||||
{
|
||||
DataMgr.IsUnlockSecret.Value = 1;
|
||||
}
|
||||
}
|
||||
else if (_type == 2)
|
||||
{
|
||||
if (DataMgr.IsUnlockLive.Value == 0)
|
||||
{
|
||||
DataMgr.IsUnlockLive.Value = 1;
|
||||
}
|
||||
}
|
||||
else if (_type == 3)
|
||||
{
|
||||
if (DataMgr.IsUnlockChat.Value == 0)
|
||||
{
|
||||
DataMgr.IsUnlockChat.Value = 1;
|
||||
}
|
||||
}
|
||||
string event_type = null;
|
||||
if (_type == 1) event_type = ADEventTrack.Property.secret_albums_unclock;
|
||||
else if (_type == 2) event_type = ADEventTrack.Property.live_unclock;
|
||||
else if (_type == 3) event_type = ADEventTrack.Property.chat_unclock;
|
||||
TrackKit.SendEvent(ADEventTrack.Special, event_type);
|
||||
|
||||
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()
|
||||
{
|
||||
ui.btn_go.SetClick(OnClick);
|
||||
ui.btn_close.SetClick(OnClick);
|
||||
}
|
||||
|
||||
private void OnClick()
|
||||
{
|
||||
if (_type == 1)
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SecretAlbumsUI_Open);
|
||||
}
|
||||
else if (_type == 2)
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LiveUI_Open);
|
||||
}
|
||||
else if (_type == 3)
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChatChooseUI_Open);
|
||||
}
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.UnlockTipsUI_Close);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a536c9b704d528c4fa9c1b68f7bf9576
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,73 @@
|
||||
|
||||
|
||||
namespace BallKingdomCrush
|
||||
{
|
||||
public class UnlockTipsUICtrl : BaseUICtrl
|
||||
{
|
||||
private UnlockTipsUI ui;
|
||||
private UnlockTipsModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.UnlockTipsUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.UnlockTipsUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.UnlockTipsModel) as UnlockTipsModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new UnlockTipsUI(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,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 22db9a06cf825574c8b14ee7d2622b2d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user