com.alicizax.unity.animatio.../Runtime/Core/Property/SiblingIndex.cs
陈思海 11e5744b46 init
2025-02-07 16:05:13 +08:00

36 lines
805 B
C#

using UnityEngine;
namespace AlicizaX.AnimationFlow.Runtime {
[Category("Property")]
public class SiblingIndex : ActionNode {
public Transform target;
public int index;
protected int orgIndex;
public override void OnInit() {
orgIndex = target.GetSiblingIndex();
}
public override void OnReset() {
target.SetSiblingIndex(orgIndex);
}
public override void OnEnter() {
target.SetSiblingIndex(index);
}
public override bool Valid() {
return target != null;
}
public override bool HasSubTitle() {
return true;
}
public override string SubTitle() {
return target != null ? target.name : null;
}
}
}