Spawn markers in level

This commit is contained in:
Marco 2025-09-18 10:52:22 +02:00
commit 4b65b25dcd
18 changed files with 335 additions and 197 deletions

View file

@ -1,4 +1,5 @@
using Godot;
using Godot.Collections;
namespace Cirno.Scripts.Actors._3D;
@ -7,6 +8,20 @@ public partial class PlayerStartMarker3D : Marker3D
{
private readonly Vector3 _boxSize = new Vector3(0.5f, 0.8f, 0.5f);
[Export] public int MarkerId { get; set; } = 0;
public void _func_godot_apply_properties(Dictionary<string, Variant> props)
{
//GroupName = (string)props["targetname"];
this.AddToGroup("SpawnMarkers");
MarkerId = props["id"].AsInt32();
}
public override void _Ready()
{
this.AddToGroup("SpawnMarkers");
}
public override void _Process(double delta)
{
if (!Engine.IsEditorHint()) return;