using Godot; public partial class Bullet : Area2D { [Export] public float Speed { get; set; } = 600.0f; // The player script will set this direction when the bullet spawns public Vector2 Direction { get; set; } = Vector2.Zero; public override void _PhysicsProcess(double delta) { // Move the bullet over time. // We multiply by delta to ensure movement is framerate-independent. Position += Direction * Speed * (float)delta; } }