Merge remote-tracking branch 'origin/master' into LouDi_Pig
This commit is contained in:
commit
b6e71e6b14
@ -32,6 +32,7 @@ namespace QFramework
|
||||
string deviceName;
|
||||
|
||||
float totalTime;
|
||||
GameObject obj;
|
||||
public static AnimationAction Allocate(string path, Dictionary<string, string> datas, System.Action OnFinished = null)
|
||||
{
|
||||
var retNode = mPool.Allocate();
|
||||
@ -51,7 +52,6 @@ namespace QFramework
|
||||
TweenerCore<float, float, FloatOptions> animDot;
|
||||
public void OnStart()
|
||||
{
|
||||
GameObject obj = null;
|
||||
if (string.IsNullOrEmpty(deviceName))
|
||||
{
|
||||
obj = Utility.FindObj(path);
|
||||
@ -149,10 +149,14 @@ namespace QFramework
|
||||
{
|
||||
if (!Deinited)
|
||||
{
|
||||
if (obj != null)
|
||||
{
|
||||
anim?.Stop();
|
||||
}
|
||||
animDot?.Kill();
|
||||
anim?.Stop();
|
||||
OnFinished = null;
|
||||
Deinited = true;
|
||||
obj = null;
|
||||
mPool.Recycle(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,6 +72,7 @@ namespace QFramework
|
||||
var effect = obj.GetOrAddComponent<HighlightEffect>();
|
||||
effect.outlineColor = color;
|
||||
effect.highlighted = true;
|
||||
obj.GetOrAddComponent<HighLightOnStepChanged>();
|
||||
if (string.IsNullOrEmpty(isIndependent) == false)
|
||||
{
|
||||
switch (isIndependent)
|
||||
|
||||
8
Assets/Scripts/OpeartionHelper.meta
Normal file
8
Assets/Scripts/OpeartionHelper.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27089718485c08142b8d696ce13b2a78
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Scripts/OpeartionHelper/OnStepChanged.meta
Normal file
8
Assets/Scripts/OpeartionHelper/OnStepChanged.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7a69538f7c29aeb47804364936ea1c5c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,30 @@
|
||||
using HighlightPlus;
|
||||
using QFramework;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using static OperationController;
|
||||
|
||||
public class HighLightOnStepChanged : MonoBehaviour
|
||||
{
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
|
||||
}
|
||||
|
||||
private void OnStepChanged(StepStatusOnChange change)
|
||||
{
|
||||
var effect = GetComponent<HighlightEffect>();
|
||||
if (effect != null)
|
||||
{
|
||||
effect.highlighted = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
TypeEventSystem.Global.UnRegister<StepStatusOnChange>(OnStepChanged);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8dea558b3c0de5a48906a5a7f7806258
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
x
Reference in New Issue
Block a user