Merge branch 'main' into dev

This commit is contained in:
Mikhail 2024-08-05 09:16:09 +08:00
commit 9c2fe13194
4 changed files with 16 additions and 13 deletions

View File

@ -20,7 +20,7 @@
<tr> <tr>
<td nowrap width="100"> <td nowrap width="100">
<a href="https://github.com/DCFApixels/DragonECS/blob/main/README-RU.md"> <a href="https://github.com/DCFApixels/DragonECS/blob/main/README-RU.md">
<img src="https://github.com/user-attachments/assets/7bc29394-46d6-44a3-bace-0a3bae65d755"></br> <img src="https://github.com/user-attachments/assets/3c699094-f8e6-471d-a7c1-6d2e9530e721"></br>
<span>Русский</span> <span>Русский</span>
</a> </a>
</td> </td>
@ -31,7 +31,7 @@
</a> </a>
</td> </td>
<td nowrap width="100"> <td nowrap width="100">
<a href="https://github.com/DCFApixels/DragonECS/blob/main/README-ZN.md"> <a href="https://github.com/DCFApixels/DragonECS/blob/main/README-ZH.md">
<img src="https://github.com/user-attachments/assets/8e598a9a-826c-4a1f-b842-0c56301d2927"></br> <img src="https://github.com/user-attachments/assets/8e598a9a-826c-4a1f-b842-0c56301d2927"></br>
<span>中文</span> <span>中文</span>
</a> </a>
@ -900,3 +900,4 @@ The type or namespace name 'ReadOnlySpan<>' could not be found (are you missing
</br></br></br> </br></br></br>
</br></br></br> </br></br></br>
</br></br></br> </br></br></br>
<img width="0" src="https://github.com/user-attachments/assets/7bc29394-46d6-44a3-bace-0a3bae65d755"><!--Чтоб флаг подгружался в любом случае-->

View File

@ -31,8 +31,8 @@
</a> </a>
</td> </td>
<td nowrap width="100"> <td nowrap width="100">
<a href="https://github.com/DCFApixels/DragonECS/blob/main/README-ZN.md"> <a href="https://github.com/DCFApixels/DragonECS/blob/main/README-ZH.md">
<img src="https://github.com/user-attachments/assets/8e598a9a-826c-4a1f-b842-0c56301d2927"></br> <img src="https://github.com/user-attachments/assets/3c699094-f8e6-471d-a7c1-6d2e9530e721"></br>
<span>中文</span> <span>中文</span>
</a> </a>
</td> </td>
@ -898,3 +898,4 @@ The type or namespace name 'ReadOnlySpan<>' could not be found (are you missing
</br></br></br> </br></br></br>
</br></br></br> </br></br></br>
</br></br></br> </br></br></br>
<img width="0" src="https://github.com/user-attachments/assets/8e598a9a-826c-4a1f-b842-0c56301d2927"><!--Чтоб флаг подгружался в любом случае-->

View File

@ -28,12 +28,12 @@
</td> </td>
<td nowrap width="100"> <td nowrap width="100">
<a href="https://github.com/DCFApixels/DragonECS"> <a href="https://github.com/DCFApixels/DragonECS">
<img src="https://github.com/user-attachments/assets/30528cb5-f38e-49f0-b23e-d001844ae930"></br> <img src="https://github.com/user-attachments/assets/3c699094-f8e6-471d-a7c1-6d2e9530e721"></br>
<span>English(WIP)</span> <span>English(WIP)</span>
</a> </a>
</td> </td>
<td nowrap width="100"> <td nowrap width="100">
<a href="https://github.com/DCFApixels/DragonECS/blob/main/README-ZN.md"> <a href="https://github.com/DCFApixels/DragonECS/blob/main/README-ZH.md">
<img src="https://github.com/user-attachments/assets/8e598a9a-826c-4a1f-b842-0c56301d2927"></br> <img src="https://github.com/user-attachments/assets/8e598a9a-826c-4a1f-b842-0c56301d2927"></br>
<span>中文</span> <span>中文</span>
</a> </a>
@ -765,11 +765,11 @@ using (marker.Auto())
</br> </br>
# Framework Extension Tools # Framework Extension Tools
Для большей расширяемости фреймворка есть дополнительные инструменты. There are additional tools for greater extensibility of the framework.
## Configs ## Configs
Конструкторы классов `EcsWorld` и `EcsPipeline` могут принимать контейнеры конфигов реализующие интерфейс `IConfigContainer` или `IConfigContainerWriter`. С помощью этих контейнеров можно передавать данные и зависимости. Встроенная реализация контейнера - `ConfigContainer`, но можно так же использовать свою реализацию.</br> Constructors of `EcsWorld` and `EcsPipeline` classes can accept config containers implementing `IConfigContainer` or `IConfigContainerWriter` interface. These containers can be used to pass data and dependencies. The built-in container implementation is `ConfigContainer`, but you can also use your own implementation.</br>
Пример использования конфигов для мира: Example of using configs for EcsWorld:
``` c# ``` c#
var configs = new ConfigContainer() var configs = new ConfigContainer()
.Set(new EcsWorldConfig(entitiesCapacity: 2000, poolsCapacity: 2000) .Set(new EcsWorldConfig(entitiesCapacity: 2000, poolsCapacity: 2000)
@ -780,9 +780,9 @@ EcsDefaultWorld _world = new EcsDefaultWorld(configs);
var _someDataA = _world.Configs.Get<SomeDataA>(); var _someDataA = _world.Configs.Get<SomeDataA>();
var _someDataB = _world.Configs.Get<SomeDataB>(); var _someDataB = _world.Configs.Get<SomeDataB>();
``` ```
Пример использования конфигов для пайплайна: Example of using configs for EcsPipeline:
``` c# ``` c#
_pipeline = EcsPipeline.New()// аналогично _pipeline = EcsPipeline.New(new ConfigContainer()) _pipeline = EcsPipeline.New()// similarly _pipeline = EcsPipeline.New(new ConfigContainer())
.Configs.Set(new SomeDataA(/* ... */)) .Configs.Set(new SomeDataA(/* ... */))
.Configs.Set(new SomeDataB(/* ... */)) .Configs.Set(new SomeDataB(/* ... */))
// ... // ...
@ -857,7 +857,7 @@ public struct WorldComponent : IEcsWorldComponent<WorldComponent>
``` ```
</details> </details>
> Компоненты и конфиги можно применять для создания расширений в связке с методами расширений. > Components and configs can be used to create extensions in conjunction with extension methods.
</br> </br>
@ -898,3 +898,4 @@ The type or namespace name 'ReadOnlySpan<>' could not be found (are you missing
</br></br></br> </br></br></br>
</br></br></br> </br></br></br>
</br></br></br> </br></br></br>
<img width="0" src="https://github.com/user-attachments/assets/30528cb5-f38e-49f0-b23e-d001844ae930"><!--Чтоб флаг подгружался в любом случае-->