diff --git a/src/Builtin/BaseRunners.cs b/src/Builtin/BaseRunners.cs index e3fcf6a..539a849 100644 --- a/src/Builtin/BaseRunners.cs +++ b/src/Builtin/BaseRunners.cs @@ -4,19 +4,19 @@ namespace DCFApixels.DragonECS { public interface IEcsPreInitProcess : IEcsSystem { - public void PreInit(EcsPipeline pipeline); + void PreInit(EcsPipeline pipeline); } public interface IEcsInitProcess : IEcsSystem { - public void Init(EcsPipeline pipeline); + void Init(EcsPipeline pipeline); } public interface IEcsRunProcess : IEcsSystem { - public void Run(EcsPipeline pipeline); + void Run(EcsPipeline pipeline); } public interface IEcsDestroyProcess : IEcsSystem { - public void Destroy(EcsPipeline pipeline); + void Destroy(EcsPipeline pipeline); } public interface IEcsBaseSystem : IEcsInitProcess, IEcsRunProcess, IEcsDestroyProcess { } diff --git a/src/Builtin/InjectSystem.cs b/src/Builtin/InjectSystem.cs index 187dde6..5fa251f 100644 --- a/src/Builtin/InjectSystem.cs +++ b/src/Builtin/InjectSystem.cs @@ -38,16 +38,16 @@ namespace DCFApixels.DragonECS public interface IEcsPreInject : IEcsSystem { - public void PreInject(object obj); + void PreInject(object obj); } public interface IEcsInject : IEcsSystem { - public void Inject(T obj); + void Inject(T obj); } public interface IEcsPreInitInjectProcess : IEcsSystem { - public void OnPreInitInjectionBefore(); - public void OnPreInitInjectionAfter(); + void OnPreInitInjectionBefore(); + void OnPreInitInjectionAfter(); } namespace Internal @@ -127,9 +127,7 @@ namespace DCFApixels.DragonECS EcsRunner.Destroy(injectCallbacksRunner); } } - public void OnPreInitInjectionBefore() { } - public void OnPreInitInjectionAfter() { _injectController = null; diff --git a/src/Builtin/Systems.cs b/src/Builtin/Systems.cs index a61f702..431afa3 100644 --- a/src/Builtin/Systems.cs +++ b/src/Builtin/Systems.cs @@ -6,12 +6,9 @@ namespace DCFApixels.DragonECS public class SystemsBlockMarkerSystem : IEcsSystem { public readonly string name; - - public SystemsBlockMarkerSystem(string name) - { - this.name = name; - } + public SystemsBlockMarkerSystem(string name) { this.name = name; } } + [DebugHide, DebugColor(DebugColor.Grey)] public class DeleteEmptyEntitesSystem : IEcsRunProcess, IEcsPreInject { @@ -21,7 +18,6 @@ namespace DCFApixels.DragonECS if (obj is EcsWorld world) _worlds.Add(world); } - public void Run(EcsPipeline pipeline) { foreach (var world in _worlds) @@ -36,7 +32,6 @@ namespace DCFApixels.DragonECS { private TWorld _world; public void Inject(TWorld obj) => _world = obj; - private sealed class Subject : EcsSubject { public EcsPool pool; @@ -63,7 +58,7 @@ namespace DCFApixels.DragonECS b.AddUnique(new DeleteOneFrameComponentSystem(), AUTO_DEL_LAYER); return b; } - /// for EcsDefaultWorld + /// for EcsDefaultWorld public static EcsPipeline.Builder AutoDel(this EcsPipeline.Builder b) where TComponent : struct, IEcsComponent { diff --git a/src/Builtin/WorldRunners.cs b/src/Builtin/WorldRunners.cs index 2123165..105432b 100644 --- a/src/Builtin/WorldRunners.cs +++ b/src/Builtin/WorldRunners.cs @@ -4,15 +4,15 @@ namespace DCFApixels.DragonECS { public interface IEcsComponentAdd : IEcsSystem { - public void OnComponentAdd(int entityID); + void OnComponentAdd(int entityID); } public interface IEcsComponentWrite : IEcsSystem { - public void OnComponentWrite(int entityID); + void OnComponentWrite(int entityID); } public interface IEcsComponentDel : IEcsSystem { - public void OnComponentDel(int entityID); + void OnComponentDel(int entityID); } public interface IEcsComponentLifecycle : IEcsComponentAdd, IEcsComponentWrite, IEcsComponentDel { } @@ -46,11 +46,11 @@ namespace DCFApixels.DragonECS public interface IEcsEntityCreate : IEcsSystem { - public void OnEntityCreate(int entityID); + void OnEntityCreate(int entityID); } public interface IEcsEntityDestroy : IEcsSystem { - public void OnEntityDestroy(int entityID); + void OnEntityDestroy(int entityID); } public interface IEcsEntityLifecycle : IEcsEntityCreate, IEcsEntityDestroy { } @@ -76,11 +76,11 @@ namespace DCFApixels.DragonECS public interface IEcsWorldCreate : IEcsSystem { - public void OnWorldCreate(EcsWorld world); + void OnWorldCreate(EcsWorld world); } public interface IEcsWorldDestroy : IEcsSystem { - public void OnWorldDestroy(EcsWorld world); + void OnWorldDestroy(EcsWorld world); } public interface IEcsWorldLifecycle : IEcsWorldCreate, IEcsWorldDestroy { } diff --git a/src/Debug/Attributes/DebugColorAttribute.cs b/src/Debug/Attributes/DebugColorAttribute.cs index 314479f..253f64f 100644 --- a/src/Debug/Attributes/DebugColorAttribute.cs +++ b/src/Debug/Attributes/DebugColorAttribute.cs @@ -19,13 +19,11 @@ namespace DCFApixels.DragonECS { color = new ColorRecord(r, g, b); } - public DebugColorAttribute(DebugColor color) { this.color = new ColorRecord((int)color); } - [StructLayout(LayoutKind.Explicit, Pack = 1, Size = 4)] private readonly struct ColorRecord // Union { diff --git a/src/Debug/EcsDebugUtility.cs b/src/Debug/EcsDebugUtility.cs index a917c97..5565e8b 100644 --- a/src/Debug/EcsDebugUtility.cs +++ b/src/Debug/EcsDebugUtility.cs @@ -26,7 +26,7 @@ namespace DCFApixels.DragonECS } friendlyName += ">"; return friendlyName; -#else +#else //optimization for release build return type.Name; #endif }