]> git.cameronkatri.com Git - gmtk-gamejam.git/blobdiff - Assets/Scripts/Controllers/Player/PlayerSegment.cs
Add player graphics
[gmtk-gamejam.git] / Assets / Scripts / Controllers / Player / PlayerSegment.cs
index 63062018d2c3e254d36e10738fdbfb745eae799c..b4b32677ac00b34663a77caf180e67d4326d82b9 100644 (file)
@@ -4,19 +4,17 @@ using UnityEngine;
 namespace Controllers.Player
 {
   [RequireComponent(typeof(Rigidbody2D))]
-  [RequireComponent(typeof(SpriteRenderer))]
   public class PlayerSegment : MonoBehaviour
   {
     [SerializeField] public Control left;
     [SerializeField] public Control right;
 
-    [SerializeField] public Vector3 forceOrigin; 
+    [SerializeField] public Vector3 forceOrigin;
+
+    [SerializeField] public float height;
 
     public Rigidbody2D Rigidbody => _rigidbody != null ? _rigidbody : _rigidbody = GetComponent<Rigidbody2D>();
     private Rigidbody2D _rigidbody;
-
-    public SpriteRenderer Sprite => _sprite != null ? _sprite : _sprite = GetComponent<SpriteRenderer>();
-    private SpriteRenderer _sprite;
   }
 
   [Serializable]