Blockly游戏:池塘导师1~10参考教程
1、使用“cannon”命令以打击目标。第一个参数是角度,第二个参数是范围。找到正确的组合。
cannon(90, 40);

2、cannon(180, 50);

3、此目标需要打很长时间。使用“while (true)”循环以便无限打击。
while (true) {cannon(45, 60);}

4、while (true) {cannon(270, 60);}

5、此对手来回移动,使其很难被攻击。“scan”表达式返回特定位置具体范围内的对手。
while (true) { cannon(180, scan(180));}

6、while(true){cannon(0, scan(0));}

7、while (true) { swim(315); cannon(315, scan(315));}

8、while(true){
cannon(270,scan(270));
if(loc_y()>50) swim(270);
else stop();
}

9、while (true) {
cannon(0, scan(0));
if (loc_x() < 50) {
swim(0);
} else {
stop();
}
}

10、while(true){
if(scan(45)>=70) swim(45);
else stop();cannon(45, scan(45));}

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:25
阅读量:85
阅读量:164
阅读量:109
阅读量:109