From bc1075eada73d1beccde609613eaf2fcbc8738ac Mon Sep 17 00:00:00 2001 From: Mikhail <99481254+DCFApixels@users.noreply.github.com> Date: Mon, 9 Sep 2024 18:21:30 +0800 Subject: [PATCH] simple refactoring --- src/EcsWorld.cs | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/EcsWorld.cs b/src/EcsWorld.cs index 97b3708..69f5daf 100644 --- a/src/EcsWorld.cs +++ b/src/EcsWorld.cs @@ -820,6 +820,7 @@ namespace DCFApixels.DragonECS } public long Version { get { return _world.Version; } } public IEcsPool[] Pools { get { return _world._pools; } } + public short ID { get { return _world.id; } } public DebuggerProxy(EcsWorld world) { _world = world; @@ -828,23 +829,6 @@ namespace DCFApixels.DragonECS #endregion } - public static class EcsWorldExtenssions - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool IsNullOrDetroyed(this EcsWorld self) - { - return self == null || self.IsDestroyed; - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void ReleaseDelEntityBufferAllAuto(this EcsWorld self) - { - if (self.IsEnableReleaseDelEntBuffer) - { - self.ReleaseDelEntityBufferAll(); - } - } - } - #region Callbacks Interface public interface IEcsWorldEventListener { @@ -903,6 +887,22 @@ namespace DCFApixels.DragonECS #endregion #region Extensions + public static class EcsWorldExtenssions + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsNullOrDetroyed(this EcsWorld self) + { + return self == null || self.IsDestroyed; + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ReleaseDelEntityBufferAllAuto(this EcsWorld self) + { + if (self.IsEnableReleaseDelEntBuffer) + { + self.ReleaseDelEntityBufferAll(); + } + } + } public static class IntExtensions { [MethodImpl(MethodImplOptions.AggressiveInlining)]