public void SetSprite(Libraries.Sprite sprite) { Sprite = sprite; CurrentAnimation = sprite.DefaultAnimation; CurrentFrame = 0; CurrentTime = 0f; }
public SpriteState(Libraries.Sprite sprite, float x = 0f, float y = 0f) { this.sprite = sprite; this.x = x; this.y = y; Visible = true; }
public Entity AddSprite(string path, float x = 0f, float y = 0f) { Libraries.Sprite sprite = scene.SpriteLibrary.Register(path); spriteState = new SpriteState(sprite, x, y); if (bodyState != null) { spriteState.AddBody(bodyState); } return(this); }
public SpriteComponent(Libraries.Sprite sprite) { SetSprite(sprite); }