aboutsummaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
authorIndrajith K L2022-02-27 01:15:31 +0530
committerIndrajith K L2022-02-27 01:15:31 +0530
commit62ff5245c26c305e35a2903cc64a60cb20718e96 (patch)
tree9042f9917e77b584b0ceb421166221ef7777a5d1 /main.lua
downloadYEAD-62ff5245c26c305e35a2903cc64a60cb20718e96.tar.gz
YEAD-62ff5245c26c305e35a2903cc64a60cb20718e96.tar.bz2
YEAD-62ff5245c26c305e35a2903cc64a60cb20718e96.zip
Initial Commit
* ECS - In-Progress * GameStates - Skeleton Implemented * Library Integrations - Completed * Levels - In-Progress
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua33
1 files changed, 33 insertions, 0 deletions
diff --git a/main.lua b/main.lua
new file mode 100644
index 0000000..7f7c10d
--- /dev/null
+++ b/main.lua
@@ -0,0 +1,33 @@
+local Gamestate = require("libs.hump.gamestate")
+local LoveSplash = require("libs.o-ten-one")
+require("scenes.menu_scene");
+
+function love.load()
+ splash = LoveSplash({background={0, 0, 0}})
+ splash.onDone = onLoveSplashDone
+end
+
+function onLoveSplashDone()
+ splash = nil
+ Gamestate.switch(menu)
+ Gamestate.registerEvents()
+end
+
+function love.draw()
+ if splash then
+ splash:draw()
+ end
+end
+
+function love.update(dt)
+ if splash then
+ splash:update(dt)
+ end
+end
+
+function love.keyreleased(key, scancode)
+ -- Temporary
+ if scancode == 'escape' then
+ love.event.quit()
+ end
+end \ No newline at end of file