| | 1 | | using DCL.Controllers; |
| | 2 | | using DCL.Models; |
| | 3 | |
|
| | 4 | | namespace DCL.ECSRuntime |
| | 5 | | { |
| | 6 | | public readonly struct ECSComponentData<T> |
| | 7 | | { |
| | 8 | | public readonly IParcelScene scene; |
| | 9 | | public readonly IDCLEntity entity; |
| | 10 | | public readonly T model; |
| | 11 | | public readonly IECSComponentHandler<T> handler; |
| | 12 | |
|
| | 13 | | public ECSComponentData(IParcelScene scene, IDCLEntity entity, T model, IECSComponentHandler<T> handler) |
| | 14 | | { |
| 2545 | 15 | | this.scene = scene; |
| 2545 | 16 | | this.entity = entity; |
| 2545 | 17 | | this.model = model; |
| 2545 | 18 | | this.handler = handler; |
| 2545 | 19 | | } |
| | 20 | |
|
| | 21 | | public ECSComponentData<T> With(T newModel) |
| | 22 | | { |
| 1678 | 23 | | return new ECSComponentData<T>(scene, entity, newModel, handler); |
| | 24 | | } |
| | 25 | | } |
| | 26 | | } |