mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-22 18:26:12 +08:00
[Unity] Minor update to sample scene scripts.
This commit is contained in:
parent
fb9f53ee23
commit
e116c15ffb
@ -62,6 +62,7 @@ public class BasicPlatformerController : MonoBehaviour {
|
||||
public AudioSource jumpAudioSource;
|
||||
public AudioSource hardfallAudioSource;
|
||||
public AudioSource footstepAudioSource;
|
||||
[SpineEvent]
|
||||
public string footstepEventName = "Footstep";
|
||||
CharacterController controller;
|
||||
Vector2 velocity = Vector2.zero;
|
||||
|
||||
@ -18,11 +18,11 @@ public class RaggedySpineboy : MonoBehaviour {
|
||||
|
||||
void AddRigidbody () {
|
||||
var rb = gameObject.AddComponent<Rigidbody2D>();
|
||||
#if UNITY_5_1
|
||||
#if UNITY_5_1 || UNITY_5_2 || UNITY_5_3 || UNITY_5_4 || UNITY_5_5
|
||||
rb.freezeRotation = true;
|
||||
#else
|
||||
#else
|
||||
rb.fixedAngle = true;
|
||||
#endif
|
||||
#endif
|
||||
naturalCollider.enabled = true;
|
||||
}
|
||||
|
||||
|
||||
@ -11,11 +11,11 @@ using System.Collections;
|
||||
public class SpineboyController : MonoBehaviour {
|
||||
|
||||
SkeletonAnimation skeletonAnimation;
|
||||
public string idleAnimation = "idle";
|
||||
public string walkAnimation = "walk";
|
||||
public string runAnimation = "run";
|
||||
public string hitAnimation = "hit";
|
||||
public string deathAnimation = "death";
|
||||
[SpineAnimation] public string idleAnimation = "idle";
|
||||
[SpineAnimation] public string walkAnimation = "walk";
|
||||
[SpineAnimation] public string runAnimation = "run";
|
||||
[SpineAnimation] public string hitAnimation = "hit";
|
||||
[SpineAnimation] public string deathAnimation = "death";
|
||||
public float walkVelocity = 1;
|
||||
public float runVelocity = 3;
|
||||
public int hp = 10;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user