diff --git a/src/entlong.cs b/src/entlong.cs index 8b2a4d3..af2c556 100644 --- a/src/entlong.cs +++ b/src/entlong.cs @@ -155,9 +155,27 @@ namespace DCFApixels.DragonECS [MethodImpl(MethodImplOptions.AggressiveInlining)] public static explicit operator entlong(long a) => new entlong(a); - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static explicit operator int(entlong a) => a.ID; + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Deconstruct(out int id, out int gen, out int world) + { +#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS + if (!IsAlive) Throw.Ent_ThrowIsNotAlive(this); +#endif + id = this.id; + gen = this.gen; + world = this.world; + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Deconstruct(out int id, out int world) + { +#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS + if (!IsAlive) Throw.Ent_ThrowIsNotAlive(this); +#endif + id = this.id; + world = this.world; + } #endregion #region Other