diff options
| author | 1029chris <1029chris@gmail.com> | 2016-04-20 10:48:12 -0700 |
|---|---|---|
| committer | 1029chris <1029chris@gmail.com> | 2016-04-20 10:48:12 -0700 |
| commit | f7c70cec2946b25ca050796d7c9160044717ce29 (patch) | |
| tree | 9c5437b6ebef05c74c3ae7092e1369581b7874ca | |
| parent | 5b9e47c1f86fbcd910d96b5d5c76c5d3b7fbf31c (diff) | |
Added timer for messages
Now they appear on their own.
Start menu no longer activates messages
| -rw-r--r-- | dialogue.lua | 2 | ||||
| -rw-r--r-- | main.lua | 2 | ||||
| -rw-r--r-- | notification.lua | 2 | ||||
| -rw-r--r-- | panel.lua | 2 | ||||
| -rw-r--r-- | system.lua | 4 |
5 files changed, 9 insertions, 3 deletions
diff --git a/dialogue.lua b/dialogue.lua index 8c21369..4b74c98 100644 --- a/dialogue.lua +++ b/dialogue.lua @@ -20,6 +20,8 @@ function loadDia() msgs[19] = "I was created so you'd do this." msgs[20] = "PLEASE Let me fulfill my purpose!" msgs[21] = "www.freedownloads.com or I die." + msgstime = {30,35,40,45,50,55,60,65,160,190,230,270,300,330,360,390,430,460,490,520,600} + msgssent = 0 v1.msgs[1] = "Well well well, who do we have here? Oh, and before I forget... Click on the bubble to see my next message." v1.msgs[2] = "Cliche introductions out of the way, I'm here to take over your computer!" v1.msgs[3] = "Who the hell uses www.freedownloads.com anyways? Like,how freakin' stupid are you?" @@ -37,7 +37,7 @@ function love.load() loadDia() end function love.update(dt) - time = dt + time = time + dt sys.w = love.graphics.getWidth() sys.h = love.graphics.getHeight() minim = love.graphics.getHeight()+10 diff --git a/notification.lua b/notification.lua index b350f5f..28efd1e 100644 --- a/notification.lua +++ b/notification.lua @@ -18,7 +18,7 @@ function drawNoti() end function timeNoti(dt) notify.timer = notify.timer + dt - if notify.timer >= 5 then + if notify.timer >= 4 then notify.yes = false notify.timer = 0 notify.sound = false @@ -55,7 +55,7 @@ function drawStart() start.o = false elseif start.o == false then start.o = true - sendMessage(1, msgs[msg.c]) + --sendMessage(1, msgs[msg.c]) end end end @@ -3,6 +3,10 @@ function drawLayer(id) end function updateSystem(dt) timeNoti(dt) + if time >= msgstime[msg.c] and msgssent < msg.c then + sendMessage(1, msgs[msg.c]) + msgssent = msgssent + 1 + end end function drawSystem() love.graphics.setBackgroundColor(0, 128, 128) |
