Beispiel #1
0
 protected override void DrawAdditionalContent( )
 {
     foreach (Mob mob in mobs)
     {
         EntityRenderer.Draw(mob, map.MobPosition);
     }
 }
Beispiel #2
0
        // These are special
        public void DrawOthers(DevicePanel d)
        {
            int x            = entity.Position.X.High;
            int y            = entity.Position.Y.High;
            int Transparency = (Editor.Instance.EditLayer == null) ? 0xff : 0x32;

            if (entity.Object.Name.Name.Contains("Setup"))
            {
                EntityRenderer renderer = EntityRenderers.Where(t => t.GetObjectName() == "ZoneSetup").FirstOrDefault();
                if (renderer != null)
                {
                    renderer.Draw(d, entity, this, x, y, Transparency);
                }
            }
            else if (entity.Object.Name.Name.Contains("Intro") || entity.Object.Name.Name.Contains("Outro"))
            {
                EntityRenderer renderer = EntityRenderers.Where(t => t.GetObjectName() == "Outro_Intro_Object").FirstOrDefault();
                if (renderer != null)
                {
                    renderer.Draw(d, entity, this, x, y, Transparency);
                }
            }
            else
            {
                EntityRenderer renderer = EntityRenderers.Where(t => t.GetObjectName() == entity.Object.Name.Name).FirstOrDefault();
                if (renderer != null)
                {
                    renderer.Draw(d, entity, this, x, y, Transparency);
                }
            }
        }
Beispiel #3
0
 /// <summary>
 /// Draws the scene in a thread-safe way.
 /// </summary>
 public void Draw()
 {
     //lock (this)
     //{
     try
     {
         renderer.Draw();
     }
     catch (Exception ex)
     {
         Console.Error.WriteLine(ex);
     }
     //}
 }
Beispiel #4
0
 /// <summary>
 /// This is called when the game should draw itself.
 /// </summary>
 /// <param name="gameTime">Provides a snapshot of timing values.</param>
 protected override void Draw(GameTime gameTime)
 {
     renderer.Draw();
     base.Draw(gameTime);
 }
Beispiel #5
0
 public void Draw()
 {
     renderer.Draw();
 }