Flash游戏制作:打砖块
作者 佚名技术
来源 服务器技术
浏览
发布时间 2012-07-14
)); c = Number(c)+1; count = Number(count)+1; } //复制对象brickblue r = Number(r)+2; index = Number(index)+2; c = Number(index)+1; } c = 0; r = 7; //c和r为两个循环变量 while (Number(r)<9) { while (Number(c)<10) { duplicateMovieClip("/brickgreen", "brick" add r add c, Number(count)+1); //复制对象brickgreen,一共复制16个 setProperty("brick" add r add c, _x, 220+Number(40*c)); setProperty("brick" add r add c, _y, 50+Number(20*r)); c = Number(c)+1; count = Number(count)+1; } //设置复制出的砖块的坐标 c = 0; r = Number(r)+1; } setProperty("/brick", _visible, false); 在此图层第11 帧添加as,下面的as和第10帧相类似,不过游戏的等级更高 xspeed = 1; border = 150; bricknumber = 50; Level_index = Number(Level_index)+1; c = 0; r = 0; //c和r为两个循环变量 count = 1; while (Number(r)<5) { while (Number(c)<10) { if (((Number(r)<=Number(c)) and (Number(c)<5)) or ((Number(c)>=5) and (Number(c)<=Number(9-r)))) { duplicateMovieClip("/brick", "brick" add r add c, Number(count)+1); } else { duplicateMovieClip("/brickgreen", "brick" add r add c, Number(count)+1); } setProperty("brick" add r add c, _x, 220+Number(40*c)); setProperty("brick" add r add c, _y, 50+Number(20*r)); count = Number(count)+1; c = Number(c)+1; } //复制对象brick r = Number(r)+1; c = 0; } 在此图层第12 帧添加as, 下面的as和第11帧相类似,不过游戏的等级更高 xspeed = 2; border = 330; bricknumber = 60; c = 0; r = 0; //c和r为两个循环变量 count = 1; while (Number(r)<14) { while (Number(c)<10) { if ((Number(r) == 5) or (Number(r) == 8)) { duplicateMovieClip("/brickred", "brick" add r add c, Number(count)+1); } else if ((Number(r) == 13) or (Number(r) == 0)) { duplicateMovieClip("/brickblue", "brick" add r add c, Number(count)+1); } else if ((Number(r) == 7) or (Number(r) == 6)) { duplicateMovieClip("/brick", "brick" add r add c, Number(count)+1); } setProperty("brick" add r add c, _x, 220+Number(40*c)); setProperty("brick" add r add c, _y, 50+Number(20*r)); c = Number(c)+1; count = Number(count)+1; } r = Number(r)+1; c = 0; } setProperty("/brick", _visible, false); 在此图层第13 帧添加as,下面的as和第12帧相类似,不过游戏的等级更高 xspeed = 3; border = 250; bricknumber = 72; c = 0; r = 0; //c和r为两个循环变量 count = 1; while (Number(r)<10) { while (Number(c)<10) { if (((Number(r)>1) and (Number(r)<8) and (Number(c)>3) and (Number(c)<6)) or ((Number(c)>1) and (Number(c)<8) and (Number(r)>3) and (Number(r)<6))) { duplicateMovieClip("/brickgreen", "brick" add r add c, Number(count)+1); } else if (((Number(r) == Number(Number(5-9)+Number(c))) and (Number(r)>0) and (Number(r)<5)and (Number(c)>4) and (Number(c)<9)) or ((Number(r) == Number(5-c)) and (Number(r)>0) and (Number(r)<5) and (Number(c)>0) and (Number(c)<5)) or ((Number(9-r) == Number(5-c)) and (Number(r)>4) and (Num |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
上一篇: 轻松实现Flash动态背景下一篇: Flash游戏制作挑战:方块游戏
关于Flash游戏制作:打砖块的所有评论