From a835310b5e6906b5f393b01becd4c2a2911e4e47 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Sat, 8 Mar 2025 11:23:23 +0800 Subject: feat: welcome text and notification when map's changed --- main.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'main.lua') 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 -- cgit v1.2.3