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]