mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fixed spineboy script.
This commit is contained in:
parent
78625d6dcd
commit
b6bab0b9c2
@ -49,7 +49,6 @@ public class tk2dSpineSkeleton : MonoBehaviour, tk2dRuntime.ISpriteCollectionFor
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void Clear() {
|
private void Clear() {
|
||||||
Debug.Log("clear?!");
|
|
||||||
GetComponent<MeshFilter>().mesh = null;
|
GetComponent<MeshFilter>().mesh = null;
|
||||||
DestroyImmediate(mesh);
|
DestroyImmediate(mesh);
|
||||||
mesh = null;
|
mesh = null;
|
||||||
|
|||||||
@ -4,20 +4,13 @@ using System.Collections;
|
|||||||
/*
|
/*
|
||||||
*/
|
*/
|
||||||
public class tk2dSpineboy : MonoBehaviour {
|
public class tk2dSpineboy : MonoBehaviour {
|
||||||
|
|
||||||
/*
|
|
||||||
*/
|
|
||||||
private tk2dSpineSkeleton skeleton;
|
private tk2dSpineSkeleton skeleton;
|
||||||
|
|
||||||
/*
|
|
||||||
*/
|
|
||||||
void Start() {
|
void Start() {
|
||||||
skeleton = GetComponent<tk2dSpineSkeleton>();
|
skeleton = GetComponent<tk2dSpineSkeleton>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
void LateUpdate() {
|
||||||
*/
|
|
||||||
void Update() {
|
|
||||||
if (skeleton.loop) return;
|
if (skeleton.loop) return;
|
||||||
|
|
||||||
if (skeleton.state.Animation != null && skeleton.state.Time >= skeleton.state.Animation.Duration - 0.25) {
|
if (skeleton.state.Animation != null && skeleton.state.Time >= skeleton.state.Animation.Duration - 0.25) {
|
||||||
@ -26,8 +19,6 @@ public class tk2dSpineboy : MonoBehaviour {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
*/
|
|
||||||
void OnMouseDown() {
|
void OnMouseDown() {
|
||||||
skeleton.animationName = "jump";
|
skeleton.animationName = "jump";
|
||||||
skeleton.loop = false;
|
skeleton.loop = false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user