public void RemoveHUDObjectBack(GameObject2D hudObject) { if (HUDObjects2DBack.Remove(hudObject)) { hudObject.Scene = null; } }
public void AddHUDObjectBack(GameObject2D hudObject) { if (!HUDObjects2DBack.Contains(hudObject)) { hudObject.Scene = this; HUDObjects2DBack.Add(hudObject); } }
//public virtual void LoadParticle(Microsoft.Xna.Framework.Content.ContentManager contentmanager, SpriteBatchRenderer particleRenderer) //{ // objectsWithParticle.ForEach(objectwithparticle => objectwithparticle.LoadParticle(contentmanager, particleRenderer)); //} public virtual void Update(RenderContext rendercontext, ContentManager contentmanager) { SceneObjects2D.ForEach(sceneobject => sceneobject.Update(rendercontext)); HUDObjects2DBack.ForEach(hudobject => hudobject.Update(rendercontext)); HUDObjects2DFront.ForEach(hudobject => hudobject.Update(rendercontext)); }
//public virtual void DrawParticle(RenderContext rendercontext) //{ // objectsWithParticle.ForEach(objectwithparticle => objectwithparticle.DrawParticle(rendercontext)); //} //public virtual void DrawBGParticle(RenderContext rendercontext) //{ // bg_particle.DrawParticle(rendercontext); //} public virtual void LoadContent(ContentManager contentmanager) { SceneObjects2D.ForEach(sceneobject => sceneobject.LoadContent(contentmanager)); HUDObjects2DBack.ForEach(hudobject => hudobject.LoadContent(contentmanager)); HUDObjects2DFront.ForEach(hudobject => hudobject.LoadContent(contentmanager)); }
public virtual void DrawHUDBack(RenderContext rendercontext) { HUDObjects2DBack.ForEach(hudobject => hudobject.Draw(rendercontext)); }
//public void AddObjectWithParticle(ObjectWithParticle hudObject) //{ // if (!objectsWithParticle.Contains(hudObject)) // { // objectsWithParticle.Add(hudObject); // } //} //public void RemoveObjectWithParticle(ObjectWithParticle hudObject) //{ // if (objectsWithParticle.Remove(hudObject)) // { // } //} public virtual void Initialize() { SceneObjects2D.ForEach(sceneobject => sceneobject.Initialize()); HUDObjects2DBack.ForEach(hudobject => hudobject.Initialize()); HUDObjects2DFront.ForEach(hudobject => hudobject.Initialize()); }