mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-10 17:18:44 +08:00
[Unity] Updated SkeletonAnimationInterface to include GetSkeleton to avoid additional GetComponents.
This commit is contained in:
parent
65ef51d6bc
commit
7facdba396
@ -42,7 +42,9 @@ public class SkeletonAnimation : SkeletonRenderer, ISkeletonAnimation {
|
||||
public bool loop;
|
||||
public Spine.AnimationState state;
|
||||
|
||||
|
||||
public Skeleton GetSkeleton(){
|
||||
return this.skeleton;
|
||||
}
|
||||
|
||||
public event UpdateBonesDelegate UpdateLocal {
|
||||
add { _UpdateLocal += value; }
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using Spine;
|
||||
|
||||
public delegate void UpdateBonesDelegate (SkeletonRenderer skeletonRenderer);
|
||||
public interface ISkeletonAnimation {
|
||||
@ -39,4 +40,5 @@ public interface ISkeletonAnimation {
|
||||
event UpdateBonesDelegate UpdateComplete;
|
||||
|
||||
void LateUpdate ();
|
||||
Skeleton GetSkeleton();
|
||||
}
|
||||
|
||||
@ -15,6 +15,10 @@ public class SkeletonAnimator : SkeletonRenderer, ISkeletonAnimation {
|
||||
public enum MixMode { AlwaysMix, MixNext, SpineStyle }
|
||||
public MixMode[] layerMixModes = new MixMode[0];
|
||||
|
||||
public Skeleton GetSkeleton () {
|
||||
return this.skeleton;
|
||||
|
||||
}
|
||||
public event UpdateBonesDelegate UpdateLocal {
|
||||
add { _UpdateLocal += value; }
|
||||
remove { _UpdateLocal -= value; }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user