| | 1 | | using DCL.Controllers; |
| | 2 | | using DCL.Models; |
| | 3 | |
|
| | 4 | | namespace DCL.ECSRuntime |
| | 5 | | { |
| | 6 | | public readonly struct ECSComponentsGroupData<TD1> |
| | 7 | | { |
| | 8 | | public readonly ECSComponentData<TD1> componentData; |
| | 9 | | public readonly IParcelScene scene; |
| | 10 | | public readonly IDCLEntity entity; |
| | 11 | |
|
| | 12 | | public ECSComponentsGroupData(IParcelScene scene, IDCLEntity entity, |
| | 13 | | in ECSComponentData<TD1> componentData) |
| | 14 | | { |
| | 15 | | this.scene = scene; |
| | 16 | | this.entity = entity; |
| | 17 | | this.componentData = componentData; |
| | 18 | | } |
| | 19 | | } |
| | 20 | |
|
| | 21 | | public readonly struct ECSComponentsGroupData<TD1, TD2> |
| | 22 | | { |
| | 23 | | public readonly ECSComponentData<TD1> componentData1; |
| | 24 | | public readonly ECSComponentData<TD2> componentData2; |
| | 25 | | public readonly IParcelScene scene; |
| | 26 | | public readonly IDCLEntity entity; |
| | 27 | |
|
| | 28 | | public ECSComponentsGroupData(IParcelScene scene, IDCLEntity entity, |
| | 29 | | in ECSComponentData<TD1> componentData1, |
| | 30 | | in ECSComponentData<TD2> componentData2) |
| | 31 | | { |
| | 32 | | this.scene = scene; |
| | 33 | | this.entity = entity; |
| | 34 | | this.componentData1 = componentData1; |
| | 35 | | this.componentData2 = componentData2; |
| | 36 | | } |
| | 37 | |
|
| | 38 | | public ECSComponentsGroupData<TD1, TD2> With(ECSComponentData<TD1> data) |
| | 39 | | { |
| | 40 | | return new ECSComponentsGroupData<TD1, TD2>(scene, entity, data, componentData2); |
| | 41 | | } |
| | 42 | |
|
| | 43 | | public ECSComponentsGroupData<TD1, TD2> With(ECSComponentData<TD2> data) |
| | 44 | | { |
| | 45 | | return new ECSComponentsGroupData<TD1, TD2>(scene, entity, componentData1, data); |
| | 46 | | } |
| | 47 | | } |
| | 48 | |
|
| | 49 | | public readonly struct ECSComponentsGroupData<TD1, TD2, TD3> |
| | 50 | | { |
| | 51 | | public readonly ECSComponentData<TD1> componentData1; |
| | 52 | | public readonly ECSComponentData<TD2> componentData2; |
| | 53 | | public readonly ECSComponentData<TD3> componentData3; |
| | 54 | | public readonly IParcelScene scene; |
| | 55 | | public readonly IDCLEntity entity; |
| | 56 | |
|
| | 57 | | public ECSComponentsGroupData(IParcelScene scene, IDCLEntity entity, |
| | 58 | | in ECSComponentData<TD1> componentData1, |
| | 59 | | in ECSComponentData<TD2> componentData2, |
| | 60 | | in ECSComponentData<TD3> componentData3) |
| | 61 | | { |
| 23 | 62 | | this.scene = scene; |
| 23 | 63 | | this.entity = entity; |
| 23 | 64 | | this.componentData1 = componentData1; |
| 23 | 65 | | this.componentData2 = componentData2; |
| 23 | 66 | | this.componentData3 = componentData3; |
| 23 | 67 | | } |
| | 68 | |
|
| | 69 | | public ECSComponentsGroupData<TD1, TD2, TD3> With(ECSComponentData<TD1> data) |
| | 70 | | { |
| 3 | 71 | | return new ECSComponentsGroupData<TD1, TD2, TD3>(scene, entity, data, componentData2, componentData3); |
| | 72 | | } |
| | 73 | |
|
| | 74 | | public ECSComponentsGroupData<TD1, TD2, TD3> With(ECSComponentData<TD2> data) |
| | 75 | | { |
| 3 | 76 | | return new ECSComponentsGroupData<TD1, TD2, TD3>(scene, entity, componentData1, data, componentData3); |
| | 77 | | } |
| | 78 | |
|
| | 79 | | public ECSComponentsGroupData<TD1, TD2, TD3> With(ECSComponentData<TD3> data) |
| | 80 | | { |
| 9 | 81 | | return new ECSComponentsGroupData<TD1, TD2, TD3>(scene, entity, componentData1, componentData2, data); |
| | 82 | | } |
| | 83 | | } |
| | 84 | | } |