diff --git a/README-RU.md b/README-RU.md index 2c08159..10a1d6f 100644 --- a/README-RU.md +++ b/README-RU.md @@ -118,7 +118,7 @@ EcsDefaultWorld _world;
# Auto Builder аспектов -Так же AutoInjections упрощает построение аспектов. Для этого есть следующие атрибуты: +Так же AutoInjections упрощает построение аспектов. Теперь аспекту Для этого есть следующие атрибуты: Атрибуты для инициализации полей с пулами: * `[Inc]` - кеширует пул и добавит тип компонента в включающее ограничение аспекта, аналог метода `Inc()`; @@ -132,6 +132,16 @@ EcsDefaultWorld _world; * `[IncImplicit(type)]` - добавит в включающее ограничение указанный в конструкторе тип `type`, аналог метода `Inc()`; * `[ExcImplicit(type)]` - добавит в исключающее ограничение указанный в конструкторе тип `type`, аналог метода `Exc()`; +Для инициализации аспекта не обязательно наследоваться от `EcsAspect`, Пример: +```c# +class Aspect +{ + [ExcImplicit(typeof(FreezedTag))] + [Inc] public EcsPool poses; + [Inc] public EcsPool velocities; +} +``` +
# Auto Runner-ы @@ -164,7 +174,7 @@ _pipeline.GetRunnerAuto().Do(); ```c# class VelocitySystemDI : IEcsRun { - class Aspect : EcsAspectAuto + class Aspect { [ExcImplicit(typeof(FreezedTag))] [Inc] public EcsPool poses; diff --git a/README.md b/README.md index ea86c09..9684dbc 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,15 @@ Additional attributes for specifying aspect constraints. They can be applied to * `[IncImplicit(type)]` - adds Type from the constructor to the include constraint (equivalent to `Inc()`); * `[ExcImplicit(type)]` - adds Type from the constructor to the exclude constraint (equivalent to `Exc()`); +To initialize an aspect, it is not necessary to inherit from EcsAspect. Example: +```c# +class Aspect +{ + [ExcImplicit(typeof(FreezedTag))] + [Inc] public EcsPool poses; + [Inc] public EcsPool velocities; +} +```
# Auto Runners @@ -166,7 +175,7 @@ _pipeline.GetRunnerAuto().Do(); ```c# class VelocitySystemDI : IEcsRun { - class Aspect : EcsAspectAuto + class Aspect { [ExcImplicit(typeof(FreezedTag))] [Inc] public EcsPool poses;