Small optimization: items have a list of components that have to be drawn

This commit is contained in:
Regalis
2016-05-24 21:17:38 +03:00
parent ed529052a2
commit b4af92ace2
13 changed files with 111 additions and 86 deletions
@@ -5,7 +5,7 @@ using System.Xml.Linq;
namespace Barotrauma.Items.Components
{
class LightComponent : Powered
class LightComponent : Powered, IDrawableComponent
{
private Color lightColor;
@@ -173,7 +173,7 @@ namespace Barotrauma.Items.Components
return true;
}
public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, bool editing = false)
public void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, bool editing = false)
{
if (light.LightSprite != null && (item.body == null || item.body.Enabled))
{