Ejemplo n.º 1
0
        private void drawLootChest(OnBoardItem aChest)
        {
            Graphics gObject = canvas.CreateGraphics();
            Brush    black   = new SolidBrush(Color.Black);
            Brush    brown   = new SolidBrush(Color.Brown);
            Brush    olive   = new SolidBrush(Color.Olive);
            Brush    gold    = new SolidBrush(Color.Gold);

            gObject.FillRectangle(olive, aChest.left, aChest.top, 25, 25);
            gObject.FillRectangle(black, aChest.left + 5, aChest.top + 5, 15, 15);
            gObject.FillRectangle(brown, aChest.left + 6, aChest.top + 6, 13, 2);
            gObject.FillRectangle(brown, aChest.left + 6, aChest.top + 11, 13, 7);
            gObject.FillRectangle(gold, aChest.left + 11, aChest.top + 10, 3, 3);
        }
Ejemplo n.º 2
0
        private void buildLootChest()
        {
            int setleft = 36;
            int setTop  = 17;

            chest[0] = new OnBoardItem(setleft, setTop, setleft * 25, setTop * 25);
            setleft  = 23;
            setTop   = 3;
            chest[1] = new OnBoardItem(setleft, setTop, setleft * 25, setTop * 25);
            setleft  = 24;
            setTop   = 3;
            chest[2] = new OnBoardItem(setleft, setTop, setleft * 25, setTop * 25);

            int i;

            for (i = 0; i < chest.Length; i++)
            {
                drawLootChest(chest[i]);
            }
        }