예제 #1
0
 public void OnComponentCreated(IComponent component)
 {
     if (component is SkiUiComponent uiComponent)
     {
         _components.Add(uiComponent);
     }
 }
예제 #2
0
        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);
                }
            }
        }
예제 #3
0
 public void OnComponentCreated(IComponent component)
 {
     if (_currentlyUpdating)
     {
         _componentsToAdd.Add(component);
     }
     else if (component is IUpdateableComponent updateableComponent)
     {
         _layeredUpdateableParts.Add(updateableComponent.UpdateablePart);
         updateableComponent.UpdateablePart.UpdateOrderChanged += PartUpdateOrderChanged;
     }
 }