2013-05-10 19:46:09 +07:00

36 lines
520 B
C#

using UnityEngine;
using System.Collections;
/*
*/
public class tk2dSpineboy : MonoBehaviour {
/*
*/
private tk2dSpineSkeleton skeleton;
/*
*/
void Start() {
skeleton = GetComponent<tk2dSpineSkeleton>();
}
/*
*/
void Update() {
if(skeleton.loop) return;
if(skeleton.state.Time >= skeleton.state.Animation.Duration - 0.25) {
skeleton.animationName = "walk";
skeleton.loop = true;
}
}
/*
*/
void OnMouseDown() {
skeleton.animationName = "jump";
skeleton.loop = false;
}
}