bingo 项目提交
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class OpenGameCtrl : BaseCtrl
|
||||
{
|
||||
public static OpenGameCtrl Instance { get; private set; }
|
||||
|
||||
private OpenGameModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.OpenGameModel) as OpenGameModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 619b238dcaf0147a28182583aa7f4f0b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,48 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class OpenGameModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnReset()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 读取数据
|
||||
protected override void OnReadData()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 本地存储
|
||||
protected override void WriteLocalStorage()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e175d106ca664d5bb372aa27dbb9be4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,112 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using FairyGUI;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
using FGUI.G003_play_animal;
|
||||
using DG.Tweening;
|
||||
using Spine.Unity;
|
||||
using System;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class OpenGameUI : BaseUI
|
||||
{
|
||||
private OpenGameUICtrl ctrl;
|
||||
private OpenGameModel model;
|
||||
private FGUI.G003_play_animal.com_opengame ui;
|
||||
|
||||
public OpenGameUI(OpenGameUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.OpenGameUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "G003_play_animal";
|
||||
uiInfo.assetName = "com_opengame";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = false;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.OpenGameModel) as OpenGameModel;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.G003_play_animal.com_opengame;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
DOVirtual.DelayedCall(0.7f, () => { GameDispatcher.Instance.Dispatch(GameMsg.reset_game, args); });
|
||||
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 Action closeCallback;
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
ui.lv_text.text = "Level " + GameHelper.GetLevel().ToString();
|
||||
ui.t1.Play(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Close);
|
||||
});
|
||||
if (GameHelper.IsShowLevelTips())
|
||||
{
|
||||
Debug.Log("????????????");
|
||||
ui.tips_node.visible = true;
|
||||
FX.Instance.SetFx<SkeletonAnimation>(ui.tips_node, Fx_Type.fx_tips, sk =>
|
||||
{
|
||||
// NAAVsa.AddCompleteEvent(cardSpine, OnChangeCardFinish);
|
||||
// OnChangeCardFinish(null);
|
||||
NAAVsa.PlayAnim(sk, "animation", false);
|
||||
}, closeCallback);
|
||||
|
||||
// DOVirtual.DelayedCall(0.2f, () =>
|
||||
// {
|
||||
// ui.tips_node.visible = true;
|
||||
// var meteor1 = FXManager.Instance.SetFx<SkeletonAnimation>(ui.tips_node, Fx_Type.fx_tips, ref closeCallback);
|
||||
// });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c0726da6c334349c994d257574585439
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,77 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class OpenGameUICtrl : BaseUICtrl
|
||||
{
|
||||
private OpenGameUI ui;
|
||||
private OpenGameModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.OpenGameUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.OpenGameUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.OpenGameModel) as OpenGameModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new OpenGameUI(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: f819527a7b9184743b3fbc1d52f7c307
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user