Forráskód Böngészése

Stop Device when ESC key is pressed

Daniele Bartolini 12 éve
szülő
commit
46c777648e
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      samples/01.hello-world/lua/game.lua

+ 1 - 1
samples/01.hello-world/lua/game.lua

@@ -5,7 +5,7 @@ end
 
 function frame(dt)
 	-- Stop the engine when any key is released
-	if Keyboard.any_released() then
+	if Keyboard.key_released(Keyboard.KC_ESCAPE) then
 		Device.stop()
 	end
 end