Prechádzať zdrojové kódy

Stop Device when ESC key is pressed

Daniele Bartolini 12 rokov pred
rodič
commit
46c777648e
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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)
 function frame(dt)
 	-- Stop the engine when any key is released
 	-- Stop the engine when any key is released
-	if Keyboard.any_released() then
+	if Keyboard.key_released(Keyboard.KC_ESCAPE) then
 		Device.stop()
 		Device.stop()
 	end
 	end
 end
 end