aboutsummaryrefslogtreecommitdiff
path: root/system.lua
diff options
context:
space:
mode:
author1029chris <1029chris@gmail.com>2016-08-08 00:05:07 -0700
committer1029chris <1029chris@gmail.com>2016-08-08 00:05:07 -0700
commit4515e6a967d283d3921a8695f9d093ef0688902e (patch)
tree047d4f01dc5422ca35304af556028a9fd1d29dcd /system.lua
parentf2c4f1b45619abfd6fdd079d00adfd25e4243ef3 (diff)
Starting Virus 2 fight
Added scene 3 Virus 2 appears after closing a popup
Diffstat (limited to 'system.lua')
-rw-r--r--system.lua14
1 files changed, 14 insertions, 0 deletions
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()