Пример #1
0
        public override void initialize()
        {
            block = new ZBlock();

            block.Preview();

            color = ZBlock.color;

            Color = Color.Red;
        }
Пример #2
0
        public void setDefault()
        {
            OBlock.resetColor();

            TBlock.resetColor();

            IBlock.resetColor();

            ZBlock.resetColor();

            SBlock.resetColor();

            LBlock.resetColor();

            JBlock.resetColor();

            setColors();
        }
Пример #3
0
        GameBlockNew randomize()
        {
            randomNumber = RandomNumber(1, 8);
            GameBlockNew blockIn;

            switch (randomNumber)
            {
            case 1:
                blockIn = new OBlock();
                break;

            case 2:
                blockIn = new IBlock();
                break;

            case 3:
                blockIn = new TBlock();
                break;

            case 4:
                blockIn = new LBlock();
                break;

            case 5:
                blockIn = new JBlock();
                break;

            case 6:
                blockIn = new SBlock();
                break;

            case 7:
            default:
                blockIn = new ZBlock();
                break;
            }
            blockIn.load(Content);
            return(blockIn);
        }