diff --git a/src/Builtin/DefaultRunners.cs b/src/Builtin/Runners.cs similarity index 100% rename from src/Builtin/DefaultRunners.cs rename to src/Builtin/Runners.cs diff --git a/src/Builtin/DefaultRunners.cs.meta b/src/Builtin/Runners.cs.meta similarity index 100% rename from src/Builtin/DefaultRunners.cs.meta rename to src/Builtin/Runners.cs.meta diff --git a/src/Builtin/SystemsBlockMarkerSystem.cs b/src/Builtin/Systems.cs similarity index 100% rename from src/Builtin/SystemsBlockMarkerSystem.cs rename to src/Builtin/Systems.cs diff --git a/src/Builtin/SystemsBlockMarkerSystem.cs.meta b/src/Builtin/Systems.cs.meta similarity index 100% rename from src/Builtin/SystemsBlockMarkerSystem.cs.meta rename to src/Builtin/Systems.cs.meta diff --git a/src/Builtin/Worlds.cs b/src/Builtin/Worlds.cs new file mode 100644 index 0000000..1d6a15d --- /dev/null +++ b/src/Builtin/Worlds.cs @@ -0,0 +1,5 @@ +namespace DCFApixels.DragonECS +{ + public sealed class EcsDefaultWrold : EcsWorld { } + public sealed class EcsEventWrold : EcsWorld { } +} diff --git a/src/Builtin/Worlds.cs.meta b/src/Builtin/Worlds.cs.meta new file mode 100644 index 0000000..6c52533 --- /dev/null +++ b/src/Builtin/Worlds.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 76bb6fc0896102347bbd36ed235e45f7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/src/EcsFilter.cs b/src/EcsFilter.cs index fc56b20..3f4e668 100644 --- a/src/EcsFilter.cs +++ b/src/EcsFilter.cs @@ -7,7 +7,7 @@ namespace DCFApixels.DragonECS #region Incs/Excs base public interface IMaskCondition { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype; + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld; } #endregion @@ -15,11 +15,11 @@ namespace DCFApixels.DragonECS public interface IInc : IMaskCondition { } public struct Inc : IInc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype => Array.Empty(); + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld => Array.Empty(); } public struct Inc : IInc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -29,7 +29,7 @@ namespace DCFApixels.DragonECS } public struct Inc : IInc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -40,7 +40,7 @@ namespace DCFApixels.DragonECS } public struct Inc : IInc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -52,7 +52,7 @@ namespace DCFApixels.DragonECS } public struct Inc : IInc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -65,7 +65,7 @@ namespace DCFApixels.DragonECS } public struct Inc : IInc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -79,7 +79,7 @@ namespace DCFApixels.DragonECS } public struct Inc : IInc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -94,7 +94,7 @@ namespace DCFApixels.DragonECS } public struct Inc : IInc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -110,7 +110,7 @@ namespace DCFApixels.DragonECS } public struct Inc : IInc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -127,7 +127,7 @@ namespace DCFApixels.DragonECS } public struct Inc : IInc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -145,7 +145,7 @@ namespace DCFApixels.DragonECS } public struct Inc : IInc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -164,7 +164,7 @@ namespace DCFApixels.DragonECS } public struct Inc : IInc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -184,7 +184,7 @@ namespace DCFApixels.DragonECS } public struct Inc : IInc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -209,11 +209,11 @@ namespace DCFApixels.DragonECS public interface IExc : IMaskCondition { } public struct Exc : IExc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype => Array.Empty(); + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld => Array.Empty(); } public struct Exc : IExc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -223,7 +223,7 @@ namespace DCFApixels.DragonECS } public struct Exc : IExc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -234,7 +234,7 @@ namespace DCFApixels.DragonECS } public struct Exc : IExc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -246,7 +246,7 @@ namespace DCFApixels.DragonECS } public struct Exc : IExc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -259,7 +259,7 @@ namespace DCFApixels.DragonECS } public struct Exc : IExc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -273,7 +273,7 @@ namespace DCFApixels.DragonECS } public struct Exc : IExc { - public int[] GetComponentsIDs() where TWorldArchetype : IWorldArchetype + public int[] GetComponentsIDs() where TWorldArchetype : EcsWorld { return new int[] { @@ -316,7 +316,7 @@ namespace DCFApixels.DragonECS } public static class EcsMaskMap - where TWorldArchetype : IWorldArchetype + where TWorldArchetype : EcsWorld { private static int _count; private static int _capacity; diff --git a/src/EcsWorld.cs b/src/EcsWorld.cs index c51946d..93e6b44 100644 --- a/src/EcsWorld.cs +++ b/src/EcsWorld.cs @@ -1,15 +1,9 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Reflection; using System.Runtime.CompilerServices; -using System.Text; namespace DCFApixels.DragonECS { - public interface IWorldArchetype { } - public struct DefaultWorld : IWorldArchetype { } - public interface IEcsWorld { #region Properties @@ -37,14 +31,6 @@ namespace DCFApixels.DragonECS #endregion } - public static class IEcsWorldExt - { - public static void DelEntity(this IEcsWorld self, ent entity) - { - self.DelEntity(entity.id); - } - } - public abstract class EcsWorld { internal static IEcsWorld[] Worlds = new IEcsWorld[8]; @@ -59,8 +45,8 @@ namespace DCFApixels.DragonECS } } - public sealed class EcsWorld : EcsWorld, IEcsWorld - where TArchetype : IWorldArchetype + public abstract class EcsWorld : EcsWorld, IEcsWorld + where TArchetype : EcsWorld { private IntDispenser _entityDispenser; private EcsGroup _entities; @@ -364,4 +350,16 @@ namespace DCFApixels.DragonECS } #endregion } + + + + + + public static class IEcsWorldExt + { + public static void DelEntity(this IEcsWorld self, ent entity) + { + self.DelEntity(entity.id); + } + } }