From 4515e6a967d283d3921a8695f9d093ef0688902e Mon Sep 17 00:00:00 2001 From: 1029chris <1029chris@gmail.com> Date: Mon, 8 Aug 2016 00:05:07 -0700 Subject: Starting Virus 2 fight Added scene 3 Virus 2 appears after closing a popup --- system.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'system.lua') diff --git a/system.lua b/system.lua index 5ec8f71..186f356 100644 --- a/system.lua +++ b/system.lua @@ -11,6 +11,17 @@ function updateSystem(dt) chat.status = 1 msgssent = msgssent + 1 end + if v1.complete == true and v2.start == false then + v2.startTime = v2.startTime + dt + if v2.startTime >= 20 then + v2.start = true + addPopup(false, sys.w/2-300, sys.h/2-200, 600, 400, 1, false, true) + end + if v2.startTime >= v2.startPopups and v2.start == false then + v2.startPopups = v2.startPopups + 5 + addPopup(true) + end + end end function drawSystem() love.graphics.setBackgroundColor(0, 128, 128) @@ -26,6 +37,9 @@ function drawSystem() for i=1,#layer do drawLayer((#layer+1)-i) end + if v1.complete == true and v2.complete == false then + drawPopups() + end drawStart() if start.o == true then drawMenu() -- cgit