Exemple #1
0
        private void Remove(CameraComponent camera)
        {
            if (_cameras.Remove(camera))
            {
                camera.EnabledChanged   -= OnCameraEnabledChanged;
                camera.DrawOrderChanged -= OnCameraDrawOrderChanged;
                camera.Destroyed        -= OnCameraComponentDestroyed;

                if (camera.Enabled)
                {
                    _enabledCameras.Remove(camera);
                }
            }
        }
Exemple #2
0
 public void OnComponentDestroyed(IComponent component)
 {
     if (component is SkiUiComponent uiComponent)
     {
         _components.Remove(uiComponent);
     }
 }
Exemple #3
0
 public void OnComponentDestroyed(IComponent component)
 {
     if (_currentlyUpdating)
     {
         _componentsToRemove.Add(component);
     }
     else if (component is IUpdateableComponent updateableComponent)
     {
         _layeredUpdateableParts.Remove(updateableComponent.UpdateablePart);
         updateableComponent.UpdateablePart.UpdateOrderChanged -= PartUpdateOrderChanged;
     }
 }