[Unity TK2D] goblin script fix

This commit is contained in:
Fenrisul 2014-10-06 16:19:52 -07:00
parent 5906a0de0d
commit 315c4e8c0c

View File

@ -40,11 +40,11 @@ public class Goblins : MonoBehaviour {
public void Start () { public void Start () {
skeletonAnimation = GetComponent<SkeletonAnimation>(); skeletonAnimation = GetComponent<SkeletonAnimation>();
headBone = skeletonAnimation.skeleton.FindBone("head"); headBone = skeletonAnimation.skeleton.FindBone("head");
skeletonAnimation.UpdateBones += UpdateBones; skeletonAnimation.UpdateLocal += UpdateLocal;
} }
// This is called after the animation is applied to the skeleton and can be used to adjust the bones dynamically. // This is called after the animation is applied to the skeleton and can be used to adjust the bones dynamically.
public void UpdateBones (SkeletonAnimation skeletonAnimation) { public void UpdateLocal (SkeletonAnimation skeletonAnimation) {
headBone.Rotation += 15; headBone.Rotation += 15;
} }