mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-05 21:15:54 +00:00
Fixed explosions and mapping
This commit is contained in:
parent
d35af0dc2a
commit
bacf41e726
11 changed files with 2124 additions and 1034 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue