aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Assets/Scripts/Controllers/Player/PlayerSegment.cs
diff options
context:
space:
mode:
authorCarson Katri <carson.katri@gmail.com>2021-06-12 12:52:30 -0400
committerCarson Katri <carson.katri@gmail.com>2021-06-12 12:52:30 -0400
commit00f001ab1df95c96d5d148133bf1dbd790baae05 (patch)
tree6036134f9c3239fc71677142986c951bba332ffd /Assets/Scripts/Controllers/Player/PlayerSegment.cs
parentff111d95db1878f9c35d99e7d4fa0b4d9a0de37c (diff)
downloadgmtk-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.cs8
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]