public override void initialize()
        {
            block = new SBlock();

            block.Preview();

            color = SBlock.color;

            Color = Color.Red;
        }
Exemple #2
0
        public void setDefault()
        {
            OBlock.resetColor();

            TBlock.resetColor();

            IBlock.resetColor();

            ZBlock.resetColor();

            SBlock.resetColor();

            LBlock.resetColor();

            JBlock.resetColor();

            setColors();
        }
Exemple #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);
        }