Refactor marker management to use child count for occupancy checks; update road management to handle Marker2D types

This commit is contained in:
2025-08-23 15:48:08 +02:00
parent 608bcc552d
commit cd715a24cb
3 changed files with 10 additions and 28 deletions

View File

@@ -5,23 +5,4 @@ namespace ParasiticGod.Scripts;
[GlobalClass]
public partial class FollowerMarker : Marker2D
{
public bool IsOccupied { get; private set; }
public Follower FollowerInstance { get; private set; }
public void PlaceFollower(Follower followerInstance)
{
if (IsOccupied) return;
AddChild(followerInstance);
followerInstance.Position = Vector2.Zero;
IsOccupied = true;
FollowerInstance = followerInstance;
}
public void RemoveFollower()
{
if (!IsOccupied) return;
FollowerInstance.QueueFree();
FollowerInstance = null;
IsOccupied = false;
}
}