Merge branch 'master' into AnHui_BaoShi
This commit is contained in:
commit
95043df57c
@ -259,7 +259,7 @@ public class ActionHelper
|
||||
/// <returns></returns>
|
||||
public static ICondition GetCondition(XMLTool.ActionItem condition)
|
||||
{
|
||||
if (condition!=null)
|
||||
if (condition != null)
|
||||
{
|
||||
switch (condition.Type)
|
||||
{
|
||||
|
||||
@ -47,19 +47,37 @@ public class UIShowAction : IAction
|
||||
|
||||
public void OnStart()
|
||||
{
|
||||
if (isShow)
|
||||
Type type = null;
|
||||
if (ActionHelper.typeDict.ContainsKey(uiName))
|
||||
{
|
||||
UIKit.OpenPanelAsync(ActionHelper.typeDict[uiName], assetBundleName: uiName).ToAction().StartGlobal(() => this.Finish());
|
||||
type = ActionHelper.typeDict[uiName];
|
||||
}
|
||||
else if (CustomUIMap.typeDict.ContainsKey(uiName))
|
||||
{
|
||||
type = CustomUIMap.typeDict[uiName];
|
||||
}
|
||||
|
||||
if (type == null)
|
||||
{
|
||||
Debug.LogError($"{uiName} ÀàÐÍûÓÐÕÒµ½");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (UIKit.GetPanel(ActionHelper.typeDict[uiName]) != null)
|
||||
if (isShow)
|
||||
{
|
||||
UIKit.HidePanel(ActionHelper.typeDict[uiName]);
|
||||
UIKit.OpenPanelAsync(type, assetBundleName: uiName).ToAction().StartGlobal(() => this.Finish());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (UIKit.GetPanel(type) != null)
|
||||
{
|
||||
UIKit.HidePanel(type);
|
||||
}
|
||||
|
||||
this.Finish();
|
||||
this.Finish();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
|
||||
8
Assets/Scripts/Custom.meta
Normal file
8
Assets/Scripts/Custom.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4af85a692b427464ebde5004dd992d5e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Scripts/Custom/UIMap.meta
Normal file
8
Assets/Scripts/Custom/UIMap.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb813d5416f284549bb272f36e3423e5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
18
Assets/Scripts/Custom/UIMap/CustomUIMap.cs
Normal file
18
Assets/Scripts/Custom/UIMap/CustomUIMap.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using QFramework.Example;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class CustomUIMap : MonoBehaviour
|
||||
{
|
||||
|
||||
// 注意:此处专门给支线用的 主线的UI类型映射填写到 ActionHelper.cs的typeDict中
|
||||
public static readonly Dictionary<string, Type> typeDict = new Dictionary<string, Type>()
|
||||
{
|
||||
//{ "UIOperationList", typeof(UIOperationList) },
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
11
Assets/Scripts/Custom/UIMap/CustomUIMap.cs.meta
Normal file
11
Assets/Scripts/Custom/UIMap/CustomUIMap.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 399446e5e27181e439731e9cbd025286
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -16,7 +16,7 @@ public class HighLightFlashItem : MonoBehaviour
|
||||
public void Init(float time, int count = -1, string finishedEvent = null)
|
||||
{
|
||||
high = GetComponent<HighlightEffect>();
|
||||
high.outline = 0;
|
||||
high.outline = 0.01f;
|
||||
dotw = DOTween.To(() => high.outline, (v) => high.outline = v, 1, time).SetEase(Ease.OutFlash).SetLoops(count, LoopType.Yoyo).OnComplete(() =>
|
||||
{
|
||||
if (string.IsNullOrEmpty(finishedEvent)==false)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user