fix:1、更换项目,使用winter来创建
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
using System;
|
||||
using DG.Tweening;
|
||||
using Spine.Unity;
|
||||
|
||||
namespace FlowerPower
|
||||
using DG.Tweening;
|
||||
using Newtonsoft.Json;
|
||||
using Spine.Unity;
|
||||
using UnityEngine;
|
||||
|
||||
namespace LoveLegend
|
||||
{
|
||||
public class OpenGameUI : BaseUI
|
||||
{
|
||||
private OpenGameUICtrl ctrl;
|
||||
private OpenGameModel model;
|
||||
private FGUI.P08_Play.com_open ui;
|
||||
private FGUI.ZM_Game_04.com_open ui;
|
||||
|
||||
public OpenGameUI(OpenGameUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
@@ -18,9 +21,9 @@ namespace FlowerPower
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "P08_Play";
|
||||
uiInfo.packageName = "ZM_Game_04";
|
||||
uiInfo.assetName = "com_open";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.layerType = UILayerType.Highest;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = false;
|
||||
@@ -39,13 +42,34 @@ namespace FlowerPower
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.P08_Play.com_open;
|
||||
ui = baseUI as FGUI.ZM_Game_04.com_open;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
DOVirtual.DelayedCall(0.7f, () => { GameDispatcher.Instance.Dispatch(GameMsg.reset_game, args); });
|
||||
InitView();
|
||||
DOVirtual.DelayedCall(0.2f, () =>
|
||||
{
|
||||
if (GameHelper.GetLevel() - 1 < ConfigSystem.GetConfig<LevelUnlock>().Count&&GameHelper.IsGiftSwitch())
|
||||
{
|
||||
LevelUnlock levelUnlock_ = ConfigSystem.GetConfig<LevelUnlock>()[GameHelper.GetLevel() - 1];
|
||||
if (levelUnlock_.LeveType != 0)
|
||||
{
|
||||
if (!DataMgr.LevelUnlockList.Value.Contains(GameHelper.GetLevel() - 1))
|
||||
{
|
||||
uiCtrlDispatcher.Dispatch(UICtrlMsg.UnlockLevelUI_Open, GameHelper.GetLevel() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
if (AudioManager.Instance.IsOpenEffect)
|
||||
{
|
||||
AudioManager.Instance.PlayDynamicEffect(AudioConst.game_open);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
@@ -76,36 +100,27 @@ namespace FlowerPower
|
||||
private void InitView()
|
||||
{
|
||||
|
||||
string stage = GameHelper.gameType == 0 ? "Level " + GameHelper.GetLevel() : "";
|
||||
string stage = GameHelper.gameType == 0 ? Language.GetContentParams("need_lv_text", GameHelper.GetLevel()) : "";
|
||||
|
||||
ui.text_level.text = stage;
|
||||
|
||||
SkeletonAnimation fx_open = FXManager.Instance.SetFx<SkeletonAnimation>(ui.ani_node, Fx_Type.fx_open, ref closeCallback);
|
||||
fx_open.state.SetAnimation(0, "animation", false);
|
||||
fx_open.state.Complete += (a) =>
|
||||
{
|
||||
if (GameHelper.IsShowLevelTips()) {
|
||||
ui._group.visible = false;
|
||||
DOVirtual.DelayedCall(0.2f, () =>
|
||||
{
|
||||
ui.tips_node.visible = true;
|
||||
SkeletonAnimation meteor1 = FXManager.Instance.SetFx<SkeletonAnimation>(ui.tips_node, Fx_Type.fx_tips, ref closeCallback);
|
||||
meteor1.timeScale = 0.5f;
|
||||
meteor1.state.SetAnimation(0, "animation", false);
|
||||
meteor1.state.Complete += (a) =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Close);
|
||||
};
|
||||
if (AudioManager.Instance.IsOpenEffect)
|
||||
{
|
||||
AudioManager.Instance.PlayDynamicEffect(AudioConst.gamestart);
|
||||
}
|
||||
});
|
||||
DOVirtual.DelayedCall(2f, () => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Close); });
|
||||
} else {
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Close);
|
||||
}
|
||||
};
|
||||
|
||||
DOVirtual.DelayedCall(0.2f, () =>
|
||||
{
|
||||
ui.tips_node1.visible = true;
|
||||
var open_bg = FXManager.Instance.SetFx<SkeletonAnimation>(ui.tips_node1, Fx_Type.fx_open_bg, ref closeCallback);
|
||||
open_bg.state.SetAnimation(0, "animation", true);
|
||||
ui.tips_node1.SetScale(1.25f, 1.25f);
|
||||
|
||||
ui.tips_node.visible = true;
|
||||
var open_game = FXManager.Instance.SetFx<SkeletonAnimation>(ui.tips_node, Fx_Type.fx_open, ref closeCallback);
|
||||
open_game.state.SetAnimation(0, "animation", false);
|
||||
open_game.state.Complete += (a) =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Close);
|
||||
};
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user