Ejemplo n.º 1
0
        public void DrawSprite(TextureAsset asset, Vector2f position, Color color, int frame)
        {
            Sprite sprite = new Sprite(asset.Resource);

            sprite.Position    = position;
            sprite.Color       = color;
            sprite.TextureRect = asset.GetSprite(frame);

            sprites.Add(sprite);
        }
Ejemplo n.º 2
0
        public void DrawSprite(TextureAsset asset, Vector2f position, Color color, float rotation, Vector2f scale, Vector2f origin, int frame)
        {
            Sprite sprite = new Sprite(asset.Resource);

            sprite.Position    = position;
            sprite.Color       = color;
            sprite.Rotation    = rotation;
            sprite.Scale       = scale;
            sprite.Origin      = origin;
            sprite.TextureRect = asset.GetSprite(frame);

            sprites.Add(sprite);
        }