From 1a6d015fffef2f0369caff69cb4204d6889073fc Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Fri, 10 Feb 2023 11:59:40 -0800 Subject: [PATCH] allow Spawners to read world state --- src/Spawner.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Spawner.cs b/src/Spawner.cs index babb1f6..b0c414f 100644 --- a/src/Spawner.cs +++ b/src/Spawner.cs @@ -1,12 +1,9 @@ namespace MoonTools.ECS { - public abstract class Spawner + public abstract class Spawner : EntityComponentReader { - private World World; - - public Spawner(World world) + public Spawner(World world) : base(world) { - World = world; } protected Entity CreateEntity() => World.CreateEntity();