This commit is contained in:
Mikhail 2024-02-15 01:04:54 +08:00
parent 8299c373b9
commit 7c5f799d8e
3 changed files with 4 additions and 3 deletions

View File

@ -1,10 +1,10 @@
namespace DCFApixels.DragonECS namespace DCFApixels.DragonECS
{ {
public sealed class EcsDefaultWorld : EcsWorld, IEntityStorage public sealed class EcsDefaultWorld : EcsWorld
{ {
public EcsDefaultWorld(IEcsWorldConfig config = null, short worldID = -1) : base(config, worldID) { } public EcsDefaultWorld(IEcsWorldConfig config = null, short worldID = -1) : base(config, worldID) { }
} }
public sealed class EcsEventWorld : EcsWorld, IEntityStorage public sealed class EcsEventWorld : EcsWorld
{ {
public EcsEventWorld(IEcsWorldConfig config = null, short worldID = -1) : base(config, worldID) { } public EcsEventWorld(IEcsWorldConfig config = null, short worldID = -1) : base(config, worldID) { }
} }

View File

@ -115,6 +115,7 @@ namespace DCFApixels.DragonECS
Throw.UndefinedException(); Throw.UndefinedException();
} }
} }
id = worldID;
Worlds[worldID] = this; Worlds[worldID] = this;
_poolsMediator = new PoolsMediator(this); _poolsMediator = new PoolsMediator(this);

View File

@ -199,7 +199,7 @@ namespace DCFApixels.DragonECS
public int gen => _value.gen; public int gen => _value.gen;
public int world => _value.world; public int world => _value.world;
public EntState State => _value.IsNull ? EntState.Null : _value.IsAlive ? EntState.Alive : EntState.Dead; public EntState State => _value.IsNull ? EntState.Null : _value.IsAlive ? EntState.Alive : EntState.Dead;
public EcsWorld EcsWorld => _value.World; public EcsWorld EcsWorld => EcsWorld.GetWorld(world);
public IEnumerable<object> components public IEnumerable<object> components
{ {
get get