mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 08:38:43 +08:00
Minor SkeletonExtensions update.
This commit is contained in:
parent
42981266d1
commit
ec268a50e0
@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Spine Extensions by Mitch Thompson and John Dy
|
||||
* Full irrevocable rights and permissions granted to Esoteric Software
|
||||
@ -7,7 +5,6 @@
|
||||
|
||||
using UnityEngine;
|
||||
using Spine;
|
||||
using Spine.Unity;
|
||||
|
||||
namespace Spine.Unity {
|
||||
public static class SkeletonExtensions {
|
||||
@ -125,6 +122,16 @@ namespace Spine.Unity {
|
||||
if (animation == null) return;
|
||||
animation.Apply(skeleton, 0, time, loop, null);
|
||||
}
|
||||
|
||||
/// <summary>Resets the DrawOrder to the Setup Pose's draw order</summary>
|
||||
public static void SetDrawOrderToSetupPose (this Skeleton skeleton) {
|
||||
var slotsItems = skeleton.slots.Items;
|
||||
var drawOrder = skeleton.drawOrder;
|
||||
|
||||
drawOrder.Clear(false);
|
||||
for (int i = 0, n = skeleton.slots.Count; i < n; i++)
|
||||
drawOrder.Add(slotsItems[i]);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user