Преглед изворни кода

Add default lua file to lua sample

Daniele Bartolini пре 12 година
родитељ
комит
7fd02fc417
2 измењених фајлова са 13 додато и 1 уклоњено
  1. 1 1
      samples/lua/CMakeLists.txt
  2. 12 0
      samples/lua/lua/lua/game.lua

+ 1 - 1
samples/lua/CMakeLists.txt

@@ -10,5 +10,5 @@ target_link_libraries(game-lua crown crownlua)
 
 set_target_properties (game-lua PROPERTIES OUTPUT_NAME game)
 
+install (DIRECTORY lua DESTINATION samples)
 install (TARGETS game-lua DESTINATION samples/lua)
-

+ 12 - 0
samples/lua/lua/lua/game.lua

@@ -0,0 +1,12 @@
+function init()
+	print("Hello from lua!!!")
+end
+
+function shutdown()
+end
+
+function frame(dt)
+	if Keyboard.key_pressed(65) then
+		Device.stop()
+	end
+end