public static bool ArrayVisit = true; //数组是否可访问 #endregion //这里要注意的是 ,整个游戏的每一个动作,就像放电影一样,游戏中 准备了三副底片 //他们是 1 this.formControl.Root_Module 一个没有任何方块的图片 // 2 this.Bo_Image 消行时所用的图片 因为程序运行中 创建一副图片的时间太长 //所以选择 先使用后创建 ,这样游戏的速度 感觉上就会快一些 // 3 this.module 每一次消行后 或者 方块落下 的图片 都会 变成下一次的底片 public SingleTetirs(Control con1, int gridx, int gridy, int side, Form1 form) //new Block(this.panel1,9,19,25,this.nextShapeNO,firstPos,color) { #region 变量初始化 this.formControl = form; this.con = con1; this.d = new Draw(this); this.Brick_Width = side; this.d = new Draw(this); this.BrickArray = new ArrayList(); //所有方块存放数组 this.BrickArray.Add(new Brick_BB()); this.BrickArray.Add(new Brick_I()); this.BrickArray.Add(new Brick_L()); this.BrickArray.Add(new Brick_UL()); this.BrickArray.Add(new Brick_UT()); this.BrickArray.Add(new Brick_UZ()); this.BrickArray.Add(new Brick_Z()); this.Gridx = gridx; this.Gridy = gridy; this.Map_Array = new int[this.Gridx, this.Gridy]; this.Map_Color_Array = new int[this.Gridx, this.Gridy]; this.toolCon = form.panel_toolCon; //初始化下一个方块显示的 图片 this.Next_Brick_Im = new Bitmap(this.formControl.panel2.Width, this.formControl.panel2.Height); //用于显示当前用户 的呢称 积分 和 等级 加入委托 PaintDelegate a = new PaintDelegate(this.PaintTopMess); Form1.multiDelegate += a; this.start(); #endregion }
public Bridge(Tetirs_bridge t1, Form1 f, Message_Bridge mb) { this.tb = t1; this.mess_Interface = mb; this.toolCon = f.panel_toolCon; this.toolMess = f.label_toolMess; this.bridge_Mlist = f.imageList1; stack = new ArrayList(); queue = new ArrayList(); this.toolCon.queList = queue; this.bridge_t = new Thread(new ThreadStart(this.Reserve)); this.bridge_t.IsBackground = true; this.bridge_t.Start(); }