Пример #1
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));
        }
Пример #2
0
 public virtual void Draw(RenderContext rendercontext)
 {
     SceneObjects2D.ForEach(sceneobject => sceneobject.Draw(rendercontext));
 }
Пример #3
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));
        }
Пример #4
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());
        }