diff --git a/src/Builtin/BaseProcesses.cs b/src/Builtin/BaseProcesses.cs index bdf7b57..1277d7b 100644 --- a/src/Builtin/BaseProcesses.cs +++ b/src/Builtin/BaseProcesses.cs @@ -6,22 +6,22 @@ using System; namespace DCFApixels.DragonECS { #region Interfaces - [EcsBindWithRunner(typeof(EcsPreInitProcessRunner))] + [BindWithEcsRunner(typeof(EcsPreInitProcessRunner))] public interface IEcsPreInitProcess : IEcsProcess { void PreInit(); } - [EcsBindWithRunner(typeof(EcsInitProcessRunner))] + [BindWithEcsRunner(typeof(EcsInitProcessRunner))] public interface IEcsInitProcess : IEcsProcess { void Init(); } - [EcsBindWithRunner(typeof(EcsRunProcessRunner))] + [BindWithEcsRunner(typeof(EcsRunProcessRunner))] public interface IEcsRunProcess : IEcsProcess { void Run(); } - [EcsBindWithRunner(typeof(EcsDestroyProcessRunner))] + [BindWithEcsRunner(typeof(EcsDestroyProcessRunner))] public interface IEcsDestroyProcess : IEcsProcess { void Destroy(); diff --git a/src/Builtin/InjectSystem.cs b/src/Builtin/InjectSystem.cs index 300a9c9..3eda586 100644 --- a/src/Builtin/InjectSystem.cs +++ b/src/Builtin/InjectSystem.cs @@ -5,12 +5,12 @@ using System.Linq; namespace DCFApixels.DragonECS { - [EcsBindWithRunner(typeof(EcsPreInjectRunner))] + [BindWithEcsRunner(typeof(EcsPreInjectRunner))] public interface IEcsPreInject : IEcsProcess { void PreInject(object obj); } - [EcsBindWithRunner(typeof(EcsInjectRunner<>))] + [BindWithEcsRunner(typeof(EcsInjectRunner<>))] public interface IEcsInject : IEcsProcess { void Inject(T obj); diff --git a/src/EcsRunner.cs b/src/EcsRunner.cs index 0fbbf6e..5a1e351 100644 --- a/src/EcsRunner.cs +++ b/src/EcsRunner.cs @@ -27,11 +27,11 @@ namespace DCFApixels.DragonECS [UnityEngine.Scripting.RequireDerived, UnityEngine.Scripting.Preserve] #endif [AttributeUsage(AttributeTargets.Interface, Inherited = false, AllowMultiple = false)] - public sealed class EcsBindWithRunnerAttribute : Attribute + public sealed class BindWithEcsRunnerAttribute : Attribute { - private static readonly Type baseType = typeof(EcsRunner<>); + private static readonly Type _baseType = typeof(EcsRunner<>); public readonly Type runnerType; - public EcsBindWithRunnerAttribute(Type runnerType) + public BindWithEcsRunnerAttribute(Type runnerType) { if (runnerType == null) throw new ArgumentNullException(); @@ -41,7 +41,7 @@ namespace DCFApixels.DragonECS } private bool Check(Type type) { - if (type.IsGenericType && type.GetGenericTypeDefinition() == baseType) + if (type.IsGenericType && type.GetGenericTypeDefinition() == _baseType) return true; if (type.BaseType != null) return Check(type.BaseType); @@ -216,7 +216,7 @@ namespace DCFApixels.DragonECS if(_subclass == null) { Type interfaceType = typeof(TInterface); - if (interfaceType.TryGetAttribute(out EcsBindWithRunnerAttribute atr)) + if (interfaceType.TryGetAttribute(out BindWithEcsRunnerAttribute atr)) { Type runnerType = atr.runnerType; if (interfaceType.IsGenericType)