summaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-03-08 11:23:23 +0800
committerEltrac <hi@guhub.cn>2025-03-08 11:23:23 +0800
commita835310b5e6906b5f393b01becd4c2a2911e4e47 (patch)
treeb57df6953072a08b6251edf0da6c3437eb82387b /main.lua
parent7d1380bc7be97eb75c64e66af1619d7aa36cf35d (diff)
feat: welcome text and notification when map's changed
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/main.lua b/main.lua
index d5035d2..a45078a 100644
--- a/main.lua
+++ b/main.lua
@@ -9,6 +9,7 @@ require "logic.map"
require "utils.utils"
require "render.sprite"
+require "render.speaker"
local Renderer = require "render.renderer"
-- initializers
@@ -35,6 +36,15 @@ function love.load()
math.randomseed(os.time())
initGame()
+
+ speaker.speak({
+ "welcome",
+ "press W, A, S, D to move",
+ "click mouse to rip out your heart",
+ "and, of course, shoot the enemies",
+ "you'll need to harvest their hearts too",
+ "good luck"
+ }, 2, true)
end
function love.draw()
@@ -44,7 +54,7 @@ end
local controller = require "logic.controller"
function love.update(dt)
- local updates = { player, enemies, bullets, loot, map, controller }
+ local updates = { player, enemies, bullets, loot, map, controller, speaker }
for _, entity in ipairs(updates) do
entity.update(dt)
end