mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-09 10:15:55 +00:00
Debug boxes
This commit is contained in:
parent
05576dcbe6
commit
d35af0dc2a
9 changed files with 50 additions and 4 deletions
18
Scripts/Actors/3D/PlayerStartMarker3D.cs
Normal file
18
Scripts/Actors/3D/PlayerStartMarker3D.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Actors._3D;
|
||||
|
||||
[Tool]
|
||||
public partial class PlayerStartMarker3D : Marker3D
|
||||
{
|
||||
|
||||
private readonly Vector3 _boxSize = new Vector3(0.5f, 0.8f, 0.5f);
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (!Engine.IsEditorHint()) return;
|
||||
|
||||
DebugDraw3D.DrawBox(this.GlobalPosition - _boxSize / 2, Quaternion.Identity, _boxSize, Colors.Green);
|
||||
|
||||
//DebugDraw3D.DrawSphere(this.GlobalPosition, 0.1f, Colors.Green);
|
||||
}
|
||||
}
|
||||
1
Scripts/Actors/3D/PlayerStartMarker3D.cs.uid
Normal file
1
Scripts/Actors/3D/PlayerStartMarker3D.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://csruxpdnpj18r
|
||||
|
|
@ -8,6 +8,8 @@ namespace Cirno.Scripts.Actors;
|
|||
[Tool]
|
||||
public partial class EnemyMarker3D : PreviewMarker3D, IActivable
|
||||
{
|
||||
private readonly Vector3 _boxSize = new Vector3(0.5f, 0.8f, 0.5f);
|
||||
|
||||
private EnemyResource _enemy;
|
||||
|
||||
[Export]
|
||||
|
|
@ -100,4 +102,13 @@ public partial class EnemyMarker3D : PreviewMarker3D, IActivable
|
|||
{
|
||||
Activate();
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (!Engine.IsEditorHint()) return;
|
||||
|
||||
DebugDraw3D.DrawBox(this.GlobalPosition - _boxSize / 2, Quaternion.Identity, _boxSize, Colors.Red);
|
||||
|
||||
//DebugDraw3D.DrawSphere(this.GlobalPosition, 0.1f, Colors.Green);
|
||||
}
|
||||
}
|
||||
|
|
@ -7,6 +7,8 @@ namespace Cirno.Scripts.Actors;
|
|||
[Tool]
|
||||
public partial class ItemMarker3D : PreviewMarker3D
|
||||
{
|
||||
private readonly Vector3 _boxSize = new Vector3(0.5f, 0.8f, 0.5f);
|
||||
|
||||
private LootItem _item;
|
||||
|
||||
[Export]
|
||||
|
|
@ -117,4 +119,13 @@ public partial class ItemMarker3D : PreviewMarker3D
|
|||
|
||||
return Item.Spawn3D(this);
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (!Engine.IsEditorHint()) return;
|
||||
|
||||
DebugDraw3D.DrawBox(this.GlobalPosition - _boxSize / 2, Quaternion.Identity, _boxSize, Colors.Blue);
|
||||
|
||||
//DebugDraw3D.DrawSphere(this.GlobalPosition, 0.1f, Colors.Green);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue