[Unity] Minor update to sample scene scripts.

This commit is contained in:
pharan 2015-12-31 09:45:14 +08:00
parent fb9f53ee23
commit e116c15ffb
3 changed files with 9 additions and 8 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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;