update readme

This commit is contained in:
Mikhail 2026-03-30 10:13:09 +08:00
parent e7a0068989
commit 68618782c7
2 changed files with 22 additions and 3 deletions

View File

@ -118,7 +118,7 @@ EcsDefaultWorld _world;
</br>
# Auto Builder аспектов
Так же AutoInjections упрощает построение аспектов. Для этого есть следующие атрибуты:
Так же AutoInjections упрощает построение аспектов. Теперь аспекту Для этого есть следующие атрибуты:
Атрибуты для инициализации полей с пулами:
* `[Inc]` - кеширует пул и добавит тип компонента в включающее ограничение аспекта, аналог метода `Inc<T>()`;
@ -132,6 +132,16 @@ EcsDefaultWorld _world;
* `[IncImplicit(type)]` - добавит в включающее ограничение указанный в конструкторе тип `type`, аналог метода `Inc<T>()`;
* `[ExcImplicit(type)]` - добавит в исключающее ограничение указанный в конструкторе тип `type`, аналог метода `Exc<T>()`;
Для инициализации аспекта не обязательно наследоваться от `EcsAspect`, Пример:
```c#
class Aspect
{
[ExcImplicit(typeof(FreezedTag))]
[Inc] public EcsPool<Pose> poses;
[Inc] public EcsPool<Velocity> velocities;
}
```
</br>
# Auto Runner-ы
@ -164,7 +174,7 @@ _pipeline.GetRunnerAuto<IDoSomethingProcess>().Do();
```c#
class VelocitySystemDI : IEcsRun
{
class Aspect : EcsAspectAuto
class Aspect
{
[ExcImplicit(typeof(FreezedTag))]
[Inc] public EcsPool<Pose> poses;

View File

@ -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<T>()`);
* `[ExcImplicit(type)]` - adds Type from the constructor to the exclude constraint (equivalent to `Exc<T>()`);
To initialize an aspect, it is not necessary to inherit from EcsAspect. Example:
```c#
class Aspect
{
[ExcImplicit(typeof(FreezedTag))]
[Inc] public EcsPool<Pose> poses;
[Inc] public EcsPool<Velocity> velocities;
}
```
</br>
# Auto Runners
@ -166,7 +175,7 @@ _pipeline.GetRunnerAuto<IDoSomethingProcess>().Do();
```c#
class VelocitySystemDI : IEcsRun
{
class Aspect : EcsAspectAuto
class Aspect
{
[ExcImplicit(typeof(FreezedTag))]
[Inc] public EcsPool<Pose> poses;