Ejemplo n.º 1
0
 public void AddCameraLinkedObject(ICameraLinked toAdd)
 {
     if (!_objectsOnCamera.Contains(toAdd))
     {
         _objectsOnCamera.Add(toAdd);
     }
     if (toAdd is ICameraRelativeWithOffCameraDispose)
     {
         _objectsToDisposeOfOnceOffCamera.Add((ICameraRelativeWithOffCameraDispose)toAdd);
     }
 }
Ejemplo n.º 2
0
        public void RemoveCameraLinkedObject(ICameraLinked toRemove)
        {
            if (_objectsOnCamera.Contains(toRemove))
            {
                _objectsOnCamera.Remove(toRemove);
            }

            ICameraRelativeWithOffCameraDispose disposable = toRemove as ICameraRelativeWithOffCameraDispose;

            if ((disposable != null) && (_objectsToDisposeOfOnceOffCamera.Contains(disposable)))
            {
                _objectsToDisposeOfOnceOffCamera.Remove(disposable);
            }
        }
        public void RemoveCameraLinkedObject(ICameraLinked toRemove)
        {
            if (_objectsOnCamera.Contains(toRemove)) { _objectsOnCamera.Remove(toRemove); }

            ICameraRelativeWithOffCameraDispose disposable = toRemove as ICameraRelativeWithOffCameraDispose;
            if ((disposable != null) && (_objectsToDisposeOfOnceOffCamera.Contains(disposable))) { _objectsToDisposeOfOnceOffCamera.Remove(disposable); }
        }
 public void AddCameraLinkedObject(ICameraLinked toAdd)
 {
     if (!_objectsOnCamera.Contains(toAdd)) { _objectsOnCamera.Add(toAdd); }
     if (toAdd is ICameraRelativeWithOffCameraDispose) { _objectsToDisposeOfOnceOffCamera.Add((ICameraRelativeWithOffCameraDispose)toAdd); }
 }