aboutsummaryrefslogtreecommitdiff
path: root/virus2.lua
diff options
context:
space:
mode:
author1029chris <1029chris@gmail.com>2017-02-14 15:55:44 -0800
committer1029chris <1029chris@gmail.com>2017-02-14 15:55:44 -0800
commitdcf61eedc3f19af5a98ffd78439306ffe205ad77 (patch)
treed8154b113e47b15c150516310b0f7792275b63b7 /virus2.lua
parentb093ea581294319fff10025501e09b90c4af3926 (diff)
Added save game/load game system
game auto saves when fight ends
Diffstat (limited to 'virus2.lua')
-rw-r--r--virus2.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/virus2.lua b/virus2.lua
index ce2726c..317c8e4 100644
--- a/virus2.lua
+++ b/virus2.lua
@@ -322,6 +322,8 @@ function drawVirusFight2()
if v1.explodeEndFrame >= 20 then
v2.start = false
if v2.c.health == -20 then
+ local prevSave = love.filesystem.read("savegame.txt")
+ love.filesystem.write("savegame.txt", prevSave .. "v2.complete = true;virus2Lose = " .. virus2Lose .. ";")
scene = 1
win[4].w = 200
antivirus.status = "Virus Defeated"