我正在创建一个 Flash 游戏。不幸的是,当玩家按下“Enter”时,游戏会不断循环其场景。我尝试了以下方法(尽管我知道这有点笨拙):
// The Enter Key was pressed
// If the Enter key is pressed, the keyboard input is "changed" to
// be '.'. This prevents a problem in which the Player would
// press 'Enter' and the game screen would continuously cycle
// through scenes
if (event.keyCode == Keyboard.ENTER) {
// The 'PERIOD' key does nothing
event.keyCode = Keyboard.PERIOD;
//spaceKeyPressed = true;
}
有没有办法防止“进入”在场景中循环?
谢谢,
基督教