Ejemplo n.º 1
0
        private void BlueprintButtons_Click(object sender, EventArgs e)
        {
            sbyte[] ButtonData = (sbyte[])((Button)sender).Tag;
            switch (ButtonData[0])
            {
            case 0:
                Rotation += ButtonData[1];
                if (Rotation == -1)
                {
                    Rotation = 3;
                }
                if (Rotation == 4)
                {
                    Rotation = 0;
                }
                break;

            case 1:
                int BlueprintCount = Blueprints.GetLength(0);
                SelectedBlueprint += ButtonData[1];
                if (SelectedBlueprint == -1)
                {
                    SelectedBlueprint = BlueprintCount - 1;
                }
                if (SelectedBlueprint == BlueprintCount)
                {
                    SelectedBlueprint = 0;
                }
                break;
            }
            clearSprites();
            MakeBlueprint(SelectedBlueprint, Rotation);
        }