This commit is contained in:
DCFApixels 2025-04-14 18:21:20 +08:00
parent ee9c9d598a
commit 3c053b2a5e
2 changed files with 8 additions and 1 deletions

View File

@ -45,10 +45,15 @@ namespace DCFApixels.DragonECS
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool TryGetWorld(short worldID, out EcsWorld world) public static bool TryGetWorld(short worldID, out EcsWorld world)
{// ts {// ts
if(worldID >= _worlds.Length)
{
world = null;
return false;
}
world = _worlds[worldID]; world = _worlds[worldID];
return return
world != null && world != null &&
world.IsDestroyed != false && world.IsDestroyed == false &&
worldID != 0; worldID != 0;
} }

View File

@ -464,6 +464,8 @@ namespace DCFApixels.DragonECS
a.gen != b.gen || a.gen != b.gen ||
a.world != b.world; a.world != b.world;
} }
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator EntitySlotInfo(entlong a) { return new EntitySlotInfo(a._full); }
#endregion #endregion
#region Other #region Other