You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Babushka/scripts/CSharp/GameEntity/Management/EntitySceneManager.cs

25 lines
592 B

using Godot;
using PositionalEntity = Babushka.scripts.CSharp.GameEntity.Entities.PositionalEntity;
namespace Babushka.scripts.CSharp.GameEntity.Management;
public partial class EntitySceneManager : Node2D
{
[Export] public string sceneName = "none";
public void AddEntity(PositionalEntity entity)
{
AddChild(entity);
}
public void RemoveAllEntities()
{
foreach (var entity in GetChildren())
{
if (entity is PositionalEntity positionalEntity)
{
RemoveChild(entity);
}
}
}
}