diff options
author | Carson Katri <carson.katri@gmail.com> | 2021-06-12 12:52:30 -0400 |
---|---|---|
committer | Carson Katri <carson.katri@gmail.com> | 2021-06-12 12:52:30 -0400 |
commit | 00f001ab1df95c96d5d148133bf1dbd790baae05 (patch) | |
tree | 6036134f9c3239fc71677142986c951bba332ffd /Assets/Scripts/Controllers/Player/PlayerSegment.cs | |
parent | ff111d95db1878f9c35d99e7d4fa0b4d9a0de37c (diff) | |
download | gmtk-gamejam-00f001ab1df95c96d5d148133bf1dbd790baae05.tar.gz gmtk-gamejam-00f001ab1df95c96d5d148133bf1dbd790baae05.tar.zst gmtk-gamejam-00f001ab1df95c96d5d148133bf1dbd790baae05.zip |
Add player graphics
Diffstat (limited to 'Assets/Scripts/Controllers/Player/PlayerSegment.cs')
-rw-r--r-- | Assets/Scripts/Controllers/Player/PlayerSegment.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Assets/Scripts/Controllers/Player/PlayerSegment.cs b/Assets/Scripts/Controllers/Player/PlayerSegment.cs index 6306201..b4b3267 100644 --- a/Assets/Scripts/Controllers/Player/PlayerSegment.cs +++ b/Assets/Scripts/Controllers/Player/PlayerSegment.cs @@ -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] |