mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-26 00:45:20 +00:00
* 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
25 lines
688 B
C#
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;
|
|
}
|
|
}
|
|
}
|