Files
MonoGame.Extended/Source/Demos/Demo.Platformer/Entities/Components/SpriteComponent.cs
T
Lucas Girouard-StranksandDylan Wilson 2725d02715 Artemis Entity Component System (#360)
* artemis ecs

* Working on StarWarrior

* Refactor for bugs

* demo works :)

* Fix pool bug

* Fix string typo

* ObjectPool garbage optimization

* Aspect attribute

* Remove BigInteger

* Fix demo

* Refactor for events

* wip on platformer demo

* Fix typo
2017-04-02 18:16:39 +10:00

25 lines
688 B
C#

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGame.Extended.Entities;
namespace Demo.Platformer.Entities.Components
{
[EntityComponent]
[EntityComponentPool(InitialSize = 100)]
public class SpriteComponent : EntityComponent
{
public Vector2 Origin { get; set; }
public Color Color { get; set; }
public float Depth { get; set; }
public SpriteEffects Effects { get; set; }
public Texture2D Texture { get; set; }
public Rectangle? SourceRectangle { get; set; }
public override void Reset()
{
Color = Color.White;
Texture = null;
}
}
}