Example #1
0
        public bool DestroyStage(ulong id)
        {
            if (_renderStageCollection.Contains(id))
            {
                _stagesForDestruction.Add(new Tuple <ulong, bool>(id, false));
                return(true);
            }

            _frameworkMessenger.Report("Unable to Destroy a Render Stage as ulong does not exist in collection");
            return(false);
        }
Example #2
0
        public void ProcessPendingDestruction()
        {
            _camerasToDestroy.ForEach(id =>
            {
                if (_camera2DCollection.Contains(id))
                {
                    var cam2d = _camera2DCollection.Retrieve(id);
                    cam2d.Destroy();
                    _camera2DCollection.Remove(id);
                    return;
                }

                if (_camera3DCollection.Contains(id))
                {
                    var cam3d = _camera3DCollection.Retrieve(id);
                    cam3d.Destroy();
                    _camera3DCollection.Remove(id);
                }
            });

            _camerasToDestroy.Clear();
        }