예제 #1
0
 public void RemoveHUDObjectBack(GameObject2D hudObject)
 {
     if (HUDObjects2DBack.Remove(hudObject))
     {
         hudObject.Scene = null;
     }
 }
예제 #2
0
 public void AddHUDObjectBack(GameObject2D hudObject)
 {
     if (!HUDObjects2DBack.Contains(hudObject))
     {
         hudObject.Scene = this;
         HUDObjects2DBack.Add(hudObject);
     }
 }
예제 #3
0
        //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));
        }
예제 #4
0
        //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));
        }
예제 #5
0
 public virtual void DrawHUDBack(RenderContext rendercontext)
 {
     HUDObjects2DBack.ForEach(hudobject => hudobject.Draw(rendercontext));
 }
예제 #6
0
        //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());
        }