mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-10 09:08:42 +08:00
Minor updates.
This commit is contained in:
parent
8fca7bf3ba
commit
0fb51b3869
@ -11,7 +11,7 @@ Shader "Skeleton" {
|
||||
Pass {
|
||||
ColorMaterial AmbientAndDiffuse
|
||||
SetTexture [_MainTex] {
|
||||
combine texture * primary
|
||||
Combine texture * primary
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,15 +33,24 @@
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using Spine;
|
||||
using System;
|
||||
|
||||
public class Spineboy : MonoBehaviour {
|
||||
SkeletonAnimation skeletonAnimation;
|
||||
|
||||
public void Start () {
|
||||
SkeletonAnimation skeletonAnimation = GetComponent<SkeletonAnimation>();
|
||||
skeletonAnimation = GetComponent<SkeletonAnimation>();
|
||||
skeletonAnimation.state.SetAnimation(0, "walk", true);
|
||||
|
||||
skeletonAnimation.state.Event += new EventHandler<EventTriggeredArgs>(Event);
|
||||
}
|
||||
|
||||
public void Event (object sender, EventTriggeredArgs e) {
|
||||
Debug.Log(e.TrackIndex + " " + skeletonAnimation.state.GetCurrent(e.TrackIndex) + ": event " + e.Event + ", " + e.Event.Int);
|
||||
}
|
||||
|
||||
public void OnMouseDown () {
|
||||
SkeletonAnimation skeletonAnimation = GetComponent<SkeletonAnimation>();
|
||||
skeletonAnimation.state.SetAnimation(0, "jump", false);
|
||||
skeletonAnimation.state.AddAnimation(0, "walk", true, 0);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user