Fixed explosions and mapping

This commit is contained in:
Marco 2025-07-02 14:23:55 +02:00
commit bacf41e726
11 changed files with 2124 additions and 1034 deletions

View file

@ -21,6 +21,8 @@ public partial class GameController : Node
public Vector3? PlayerPosition => _player?.GlobalPosition ?? null;
public Vector3? PlayerVelocity => _player?.Velocity ?? null;
[Export] public bool DebugDraw { get; set; }
[Signal]
public delegate void ManagerReadyEventHandler();

View file

@ -117,6 +117,7 @@ public partial class Bullet3D : Area3D, IBullet
private void SetSpriteRotationToDirection()
{
if (!BulletInfo.Attributes.HasFlag(BulletFlags.Rotateable)) return;
_sprite?.SetRotation(MakeRotationFromDirection(_direction));
}
@ -283,6 +284,11 @@ public partial class Bullet3D : Area3D, IBullet
{
Destroy();
}
if (GameController.Instance is not null && GameController.Instance.DebugDraw)
{
DebugDraw3D.DrawSphere(this.GlobalPosition, this._bulletInfo.OriginalBulletResource.BulletSize, Colors.DarkRed);
}
}
public override void _PhysicsProcess(double delta)