public void ShiftToPaddle() { Paddle paddle = GetPaddle(); CapsuleShape2D paddleShape = (CapsuleShape2D)((CollisionShape2D)paddle.GetNode("CollisionShape2D")).Shape; Position = new Vector2(x: GetPaddle().Position.x, y: paddle.Position.y - paddleShape.Radius * 2); velocity = new Vector2(); }
public EntityData() { Sprite = new Sprite(); Collider = new CollisionShape2D(); Shape = new CapsuleShape2D(); Collider.Shape = Shape; Collider.RotationDegrees = 90; }