发布于 2022-04-19 11:02:33
您应该单独创建一个randomTrash变量,并在if语句中使用它进行检查。就像这样;
var randomTrash = trash[randomNumber(0,7)];
onEvent("recycle","click", function(){
if(randomTrash == trash[0] ...){
points = points + 1;
...
}
})
https://stackoverflow.com/questions/71929852
复制相似问题