public void drawInEditor(SpriteBatch spriteBatch) { if (!isVisible) { return; } foreach (LevelObject lo in loList) { if (lo is DrawableLevelObject) { DrawableLevelObject dlo = (DrawableLevelObject)lo; if (dlo.isVisible) { dlo.drawInEditor(spriteBatch); } } } if (particleRenderer == null) { particleRenderer = new ParticleRenderer(_graphicsM); particleRenderer.drawParticlesInEditor(_contentM); } particleRenderer.drawParticlesInEditor(_contentM); }
public void loadContentInEditor(GraphicsDevice graphics) { foreach (LevelObject lo in loList) { if (lo is DrawableLevelObject) { DrawableLevelObject dlo = (DrawableLevelObject)lo; dlo.loadContentInEditor(graphics); } } }
public void drawLayer(SpriteBatch spriteBatch) { foreach (LevelObject lo in loList) { if (lo is DrawableLevelObject) { DrawableLevelObject dlo = (DrawableLevelObject)lo; if (dlo.isVisible) { dlo.Draw(spriteBatch); } } } particleRenderer.drawParticles(); }
public void drawInEditor(SpriteBatch spriteBatch) { if (!isVisible) { return; } foreach (LevelObject lo in loList) { if (lo is DrawableLevelObject) { DrawableLevelObject dlo = (DrawableLevelObject)lo; if (dlo.isVisible) { dlo.drawInEditor(spriteBatch); } } } }
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); } }