我收到一条错误消息,告诉我第 38、60 和 79 节中有一个重复的函数。但我在那里没有看到重复的函数!
第 38 节 8 是这句话的最后一行
{
if (keyEvent.keyCode == Keyboard.RIGHT) {
rightpressed1 = true;
linkfacing1 = "right";
} else if (keyEvent.keyCode == Keyboard.LEFT) {
leftpressed1 = true;
linkfacing1 = "left";
} else if (keyEvent.keyCode == Keyboard.DOWN) {
downpressed1 = true;
linkfacing1 = "front";
} else if (keyEvent.keyCode == Keyboard.UP) {
uppressed1 = true;
linkfacing1 = "back";
}
第 60 节是最后一行
{
spacepressed1 = false;
}
第 79 节是最后一行
if (linkMc.x > 200) {
linkMc.x -= 10
} else if (overworldMc.x < 0) {
overworldMc.x += 10;
}