コード例 #1
0
        public Grabber()
        {
            isMoveRight = 0;
            isGrabbing  = 0;
            xLocation   = 12;
            yLocation   = 12;

            widthSize  = 25;
            heightSize = 25;

            grabbedItem       = null;
            grabbedItem_index = -1;
        }
コード例 #2
0
        public void generateListOfBlocks(int xleft, int xright, int ytop, int ybot, int size, int type)
        {
            int         xLocation = int.Parse(rd.Next(xleft, xright).ToString());
            int         yLocation = int.Parse(rd.Next(ytop, ybot).ToString());
            SquareBlock block     = new SquareBlock();

            if (type == 1)
            {
                block = new Gold(size, xLocation, yLocation);
            }
            else if (type == 2)
            {
                block = new Rock(size, xLocation, yLocation);
            }
            else if (type == 3)
            {
                block = new Diamond(xLocation, yLocation);
            }
            listOfMine.Add(block);
        }