mirror of
https://github.com/DCFApixels/DragonECS-AutoInjections.git
synced 2026-04-21 23:15:54 +08:00
update readme
This commit is contained in:
parent
e7a0068989
commit
68618782c7
14
README-RU.md
14
README-RU.md
@ -118,7 +118,7 @@ EcsDefaultWorld _world;
|
|||||||
</br>
|
</br>
|
||||||
|
|
||||||
# Auto Builder аспектов
|
# Auto Builder аспектов
|
||||||
Так же AutoInjections упрощает построение аспектов. Для этого есть следующие атрибуты:
|
Так же AutoInjections упрощает построение аспектов. Теперь аспекту Для этого есть следующие атрибуты:
|
||||||
|
|
||||||
Атрибуты для инициализации полей с пулами:
|
Атрибуты для инициализации полей с пулами:
|
||||||
* `[Inc]` - кеширует пул и добавит тип компонента в включающее ограничение аспекта, аналог метода `Inc<T>()`;
|
* `[Inc]` - кеширует пул и добавит тип компонента в включающее ограничение аспекта, аналог метода `Inc<T>()`;
|
||||||
@ -132,6 +132,16 @@ EcsDefaultWorld _world;
|
|||||||
* `[IncImplicit(type)]` - добавит в включающее ограничение указанный в конструкторе тип `type`, аналог метода `Inc<T>()`;
|
* `[IncImplicit(type)]` - добавит в включающее ограничение указанный в конструкторе тип `type`, аналог метода `Inc<T>()`;
|
||||||
* `[ExcImplicit(type)]` - добавит в исключающее ограничение указанный в конструкторе тип `type`, аналог метода `Exc<T>()`;
|
* `[ExcImplicit(type)]` - добавит в исключающее ограничение указанный в конструкторе тип `type`, аналог метода `Exc<T>()`;
|
||||||
|
|
||||||
|
Для инициализации аспекта не обязательно наследоваться от `EcsAspect`, Пример:
|
||||||
|
```c#
|
||||||
|
class Aspect
|
||||||
|
{
|
||||||
|
[ExcImplicit(typeof(FreezedTag))]
|
||||||
|
[Inc] public EcsPool<Pose> poses;
|
||||||
|
[Inc] public EcsPool<Velocity> velocities;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
</br>
|
</br>
|
||||||
|
|
||||||
# Auto Runner-ы
|
# Auto Runner-ы
|
||||||
@ -164,7 +174,7 @@ _pipeline.GetRunnerAuto<IDoSomethingProcess>().Do();
|
|||||||
```c#
|
```c#
|
||||||
class VelocitySystemDI : IEcsRun
|
class VelocitySystemDI : IEcsRun
|
||||||
{
|
{
|
||||||
class Aspect : EcsAspectAuto
|
class Aspect
|
||||||
{
|
{
|
||||||
[ExcImplicit(typeof(FreezedTag))]
|
[ExcImplicit(typeof(FreezedTag))]
|
||||||
[Inc] public EcsPool<Pose> poses;
|
[Inc] public EcsPool<Pose> poses;
|
||||||
|
|||||||
11
README.md
11
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<T>()`);
|
* `[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>()`);
|
* `[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>
|
</br>
|
||||||
|
|
||||||
# Auto Runners
|
# Auto Runners
|
||||||
@ -166,7 +175,7 @@ _pipeline.GetRunnerAuto<IDoSomethingProcess>().Do();
|
|||||||
```c#
|
```c#
|
||||||
class VelocitySystemDI : IEcsRun
|
class VelocitySystemDI : IEcsRun
|
||||||
{
|
{
|
||||||
class Aspect : EcsAspectAuto
|
class Aspect
|
||||||
{
|
{
|
||||||
[ExcImplicit(typeof(FreezedTag))]
|
[ExcImplicit(typeof(FreezedTag))]
|
||||||
[Inc] public EcsPool<Pose> poses;
|
[Inc] public EcsPool<Pose> poses;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user