我做游戏.在// ERROR ZONE中称为Exception.我不明白.类游戏有List recrangles.
void spawnt(){
var rnd = new Random();
var rnd2 = new Random();
rnd = rnd.nextInt(100);
if(rnd2.nextBool())
rnd2 = rnd2.nextInt(100);
else
rnd2 = -rnd2.nextInt(100);
var x = flappy.position["x"]+lastx+sw+rnd;
var y = rnd2*pomer-100-1800*pomer-168*pomer;
Rectangle vrch = new Rectangle("img/tube1.png", sw, sh, {"x":x, "y":y, "z":0});
Rectangle spodek = new Rectangle("img/tube2.png", sw, sh, {"x":x, "y":sh+mezeray*pomer+y, "z":0});
vrch.onCollision((_){
checkover();
});
spodek.onCollision((_){
checkover();
});
game.addObject(spodek);
game.addObject(vrch);
var cp = new Checkpoint(sw, mezeray, {"x":x+sw, "y":y+sh, "z":0});
cp.onCollision((e){
scoore++;
querySelector("#scoore").text="SCOORE: ${scoore}";
sounds[1].play();
//THIS IS ERROR …Run Code Online (Sandbox Code Playgroud)