mirror of
https://github.com/Phantop/LADXHD.git
synced 2024-11-01 12:24:16 +00:00
26 lines
631 B
C#
26 lines
631 B
C#
|
using Microsoft.Xna.Framework.Graphics;
|
|||
|
using ProjectZ.InGame.GameObjects.Base.CObjects;
|
|||
|
|
|||
|
namespace ProjectZ.InGame.GameObjects.Base.Components
|
|||
|
{
|
|||
|
public class DrawCSpriteComponent : DrawComponent
|
|||
|
{
|
|||
|
public CSprite Sprite;
|
|||
|
|
|||
|
public DrawCSpriteComponent(CSprite sprite, int layer)
|
|||
|
: base(layer, sprite.Position)
|
|||
|
{
|
|||
|
Sprite = sprite;
|
|||
|
Draw = DrawFunction;
|
|||
|
}
|
|||
|
|
|||
|
public void DrawFunction(SpriteBatch spriteBatch)
|
|||
|
{
|
|||
|
if (!IsActive)
|
|||
|
return;
|
|||
|
|
|||
|
Sprite.Draw(spriteBatch);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|