Exemplo n.º 1
0
 public void RemoveSceneObject(GameObject2D sceneobject)
 {
     if (SceneObjects2D.Remove(sceneobject))
     {
         sceneobject.Scene = null;
     }
 }
Exemplo n.º 2
0
 public void AddSceneObject(GameObject2D sceneobject)
 {
     if (!SceneObjects2D.Contains(sceneobject))
     {
         sceneobject.Scene = this;
         SceneObjects2D.Add(sceneobject);
     }
 }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 5
0
 public virtual void Draw(RenderContext rendercontext)
 {
     SceneObjects2D.ForEach(sceneobject => sceneobject.Draw(rendercontext));
 }
Exemplo n.º 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());
        }