mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fixed compilation for Unity < 4.5.
This commit is contained in:
parent
14aeb49650
commit
323f4a4fd5
@ -39,36 +39,48 @@ using System.Collections;
|
|||||||
[RequireComponent(typeof(CharacterController))]
|
[RequireComponent(typeof(CharacterController))]
|
||||||
public class BasicPlatformerController : MonoBehaviour {
|
public class BasicPlatformerController : MonoBehaviour {
|
||||||
|
|
||||||
|
#if !UNITY_4_3 && !UNITY_4_4
|
||||||
[Header("Controls")]
|
[Header("Controls")]
|
||||||
|
#endif
|
||||||
public string XAxis = "Horizontal";
|
public string XAxis = "Horizontal";
|
||||||
public string YAxis = "Vertical";
|
public string YAxis = "Vertical";
|
||||||
public string JumpButton = "Jump";
|
public string JumpButton = "Jump";
|
||||||
|
|
||||||
[Header("Moving")]
|
#if !UNITY_4_3 && !UNITY_4_4
|
||||||
public float walkSpeed = 4;
|
[Header("Moving")]
|
||||||
|
#endif
|
||||||
|
public float walkSpeed = 4;
|
||||||
public float runSpeed = 10;
|
public float runSpeed = 10;
|
||||||
public float gravity = 65;
|
public float gravity = 65;
|
||||||
|
|
||||||
[Header("Jumping")]
|
#if !UNITY_4_3 && !UNITY_4_4
|
||||||
public float jumpSpeed = 25;
|
[Header("Jumping")]
|
||||||
|
#endif
|
||||||
|
public float jumpSpeed = 25;
|
||||||
public float jumpDuration = 0.5f;
|
public float jumpDuration = 0.5f;
|
||||||
public float jumpInterruptFactor = 100;
|
public float jumpInterruptFactor = 100;
|
||||||
public float forceCrouchVelocity = 25;
|
public float forceCrouchVelocity = 25;
|
||||||
public float forceCrouchDuration = 0.5f;
|
public float forceCrouchDuration = 0.5f;
|
||||||
|
|
||||||
[Header("Graphics")]
|
#if !UNITY_4_3 && !UNITY_4_4
|
||||||
public Transform graphicsRoot;
|
[Header("Graphics")]
|
||||||
|
#endif
|
||||||
|
public Transform graphicsRoot;
|
||||||
public SkeletonAnimation skeletonAnimation;
|
public SkeletonAnimation skeletonAnimation;
|
||||||
|
|
||||||
[Header("Animation")]
|
#if !UNITY_4_3 && !UNITY_4_4
|
||||||
public string walkName = "Walk";
|
[Header("Animation")]
|
||||||
|
#endif
|
||||||
|
public string walkName = "Walk";
|
||||||
public string runName = "Run";
|
public string runName = "Run";
|
||||||
public string idleName = "Idle";
|
public string idleName = "Idle";
|
||||||
public string jumpName = "Jump";
|
public string jumpName = "Jump";
|
||||||
public string fallName = "Fall";
|
public string fallName = "Fall";
|
||||||
public string crouchName = "Crouch";
|
public string crouchName = "Crouch";
|
||||||
|
|
||||||
|
#if !UNITY_4_3 && !UNITY_4_4
|
||||||
[Header("Audio")]
|
[Header("Audio")]
|
||||||
|
#endif
|
||||||
public AudioSource jumpAudioSource;
|
public AudioSource jumpAudioSource;
|
||||||
public AudioSource hardfallAudioSource;
|
public AudioSource hardfallAudioSource;
|
||||||
public AudioSource footstepAudioSource;
|
public AudioSource footstepAudioSource;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user