mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +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 bool loop;
|
||||||
public Spine.AnimationState state;
|
public Spine.AnimationState state;
|
||||||
|
|
||||||
|
public Skeleton GetSkeleton(){
|
||||||
|
return this.skeleton;
|
||||||
|
}
|
||||||
|
|
||||||
public event UpdateBonesDelegate UpdateLocal {
|
public event UpdateBonesDelegate UpdateLocal {
|
||||||
add { _UpdateLocal += value; }
|
add { _UpdateLocal += value; }
|
||||||
|
|||||||
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using Spine;
|
||||||
|
|
||||||
public delegate void UpdateBonesDelegate (SkeletonRenderer skeletonRenderer);
|
public delegate void UpdateBonesDelegate (SkeletonRenderer skeletonRenderer);
|
||||||
public interface ISkeletonAnimation {
|
public interface ISkeletonAnimation {
|
||||||
@ -39,4 +40,5 @@ public interface ISkeletonAnimation {
|
|||||||
event UpdateBonesDelegate UpdateComplete;
|
event UpdateBonesDelegate UpdateComplete;
|
||||||
|
|
||||||
void LateUpdate ();
|
void LateUpdate ();
|
||||||
|
Skeleton GetSkeleton();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,6 +15,10 @@ public class SkeletonAnimator : SkeletonRenderer, ISkeletonAnimation {
|
|||||||
public enum MixMode { AlwaysMix, MixNext, SpineStyle }
|
public enum MixMode { AlwaysMix, MixNext, SpineStyle }
|
||||||
public MixMode[] layerMixModes = new MixMode[0];
|
public MixMode[] layerMixModes = new MixMode[0];
|
||||||
|
|
||||||
|
public Skeleton GetSkeleton () {
|
||||||
|
return this.skeleton;
|
||||||
|
|
||||||
|
}
|
||||||
public event UpdateBonesDelegate UpdateLocal {
|
public event UpdateBonesDelegate UpdateLocal {
|
||||||
add { _UpdateLocal += value; }
|
add { _UpdateLocal += value; }
|
||||||
remove { _UpdateLocal -= value; }
|
remove { _UpdateLocal -= value; }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user