public override void initialize() { block = new OBlock(); block.Preview(); color = OBlock.color; Color = Color.Red; }
public void setDefault() { OBlock.resetColor(); TBlock.resetColor(); IBlock.resetColor(); ZBlock.resetColor(); SBlock.resetColor(); LBlock.resetColor(); JBlock.resetColor(); setColors(); }
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); }