public void OnComponentCreated(IComponent component) { if (component is SkiUiComponent uiComponent) { _components.Add(uiComponent); } }
public void Add(CameraComponent camera) { camera.Group?.Remove(camera); if (_cameras.Add(camera)) { camera.Group = this; camera.EnabledChanged += OnCameraEnabledChanged; camera.DrawOrderChanged += OnCameraDrawOrderChanged; camera.Destroyed += OnCameraComponentDestroyed; if (camera.Enabled) { _enabledCameras.Add(camera); } } }
public void OnComponentCreated(IComponent component) { if (_currentlyUpdating) { _componentsToAdd.Add(component); } else if (component is IUpdateableComponent updateableComponent) { _layeredUpdateableParts.Add(updateableComponent.UpdateablePart); updateableComponent.UpdateablePart.UpdateOrderChanged += PartUpdateOrderChanged; } }