public void loadContentInEditor(GraphicsDevice graphics) { foreach (LevelObject lo in loList) { if (lo is DrawableLevelObject) { DrawableLevelObject dlo = (DrawableLevelObject)lo; dlo.loadContentInEditor(graphics); } } }
public void loadContentInEditor(GraphicsDeviceManager graphicsM, GraphicsDevice graphics, ContentManager content) { particleRenderer = new ParticleRenderer(graphicsM); particleRenderer.particleRenderer.LoadContent(content); this._graphicsM = graphicsM; this._contentM = content; Rt = new RenderTarget2D(graphics, graphics.Viewport.Width, graphics.Viewport.Height); foreach (LevelObject lo in loList) { if (lo is DrawableLevelObject) { DrawableLevelObject dlo = (DrawableLevelObject)lo; try { dlo.loadContentInEditor(graphics); } catch (Exception e) { DebugLogManager.writeToLogFile("Wasn't able to load " + dlo.name + " in Layer " + this.name); } } else if (lo is ParticleObject) { ParticleObject p = (ParticleObject)lo; particleRenderer.addParticleObjectsInEditor(p, content); } } particleRenderer.initializeParticlesInEditor(content); if (Effects == null) { Effects = new List <EffectObject>(); } foreach (EffectObject eo in Effects) { //eo.Initialise(); eo.loadContentInEditor(graphics, content); } }