using System;
using System.Collections.Generic;
using System.Text;
using HumanLikeBattleRobots.Logic;
using HumanLikeBattleRobots.Data;

namespace HumanLikeBattleRobots.Graphic
{
    class LegSprite: Sprite
    {
        private int frame;

        public LegSprite(int stage, bool isLeft)
            : base(stage)
        {
            int color = GameManager.MainRandom.Next(0,3);
            relativeCenterPosition = new Vec2f(14, 35);
            drawTexture = GraphicResources.SoldierLegTexture;
            if (isLeft)
                frame = color * 2;
            else
                frame = color * 2+1;
        }

        public override void Draw()
        {

            drawTexture.DrawRotAxisFrame(this.DrawPosition - this.AxisPosition, this.angle, 1,
                this.DrawPosition, (ushort)frame);
        }
    }
}
