예제 #1
0
        public override void initialize()
        {
            block = new JBlock();

            block.Preview();

            color = JBlock.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);
        }