| | 1 | | using System; |
| | 2 | | using DCL.ECS7.InternalComponents; |
| | 3 | | using DCL.ECSRuntime; |
| | 4 | |
|
| | 5 | | public class InternalECSComponents : IDisposable, IInternalECSComponents |
| | 6 | | { |
| 0 | 7 | | public IInternalECSComponent<InternalTexturizable> texturizableComponent { private set; get; } |
| 0 | 8 | | public IInternalECSComponent<InternalMaterial> materialComponent { private set; get; } |
| | 9 | |
|
| 2 | 10 | | public InternalECSComponents(ECSComponentsManager componentsManager, ECSComponentsFactory componentsFactory) |
| | 11 | | { |
| 2 | 12 | | texturizableComponent = new InternalECSComponent<InternalTexturizable>( |
| | 13 | | InternalECSComponentsId.TEXTURIZABLE, |
| | 14 | | componentsManager, |
| | 15 | | componentsFactory, |
| 10 | 16 | | () => new InternalTexturizableHandler(() => texturizableComponent)); |
| | 17 | |
|
| 2 | 18 | | materialComponent = new InternalECSComponent<InternalMaterial>( |
| | 19 | | InternalECSComponentsId.MATERIAL, |
| | 20 | | componentsManager, |
| | 21 | | componentsFactory, |
| 5 | 22 | | () => new InternalMaterialHandler()); |
| 2 | 23 | | } |
| | 24 | |
|
| | 25 | | public void Dispose() |
| | 26 | | { |
| 0 | 27 | | texturizableComponent.Dispose(); |
| 0 | 28 | | materialComponent.Dispose(); |
| 0 | 29 | | } |
| | 30 | | } |