aboutsummaryrefslogtreecommitdiff
path: root/window.lua
diff options
context:
space:
mode:
author1029chris <1029chris@gmail.com>2016-04-30 01:04:16 -0700
committer1029chris <1029chris@gmail.com>2016-04-30 01:04:16 -0700
commit1fed4cc8b402af75f785c28b5a3dd879a318c9cc (patch)
tree3165cb10c6ac77f7d00cea5725f02b0a0893e502 /window.lua
parenta7fc16d026ff6baf51e082eeee0d79f0195729c4 (diff)
Added more to fight
new bullet types: yellow and red red bullet disables the window drag yellow bullet makes window move around on its own virus has move where it comes close and fires red then green/yellow other stuff
Diffstat (limited to 'window.lua')
-rw-r--r--window.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/window.lua b/window.lua
index 5913573..c6b0a80 100644
--- a/window.lua
+++ b/window.lua
@@ -127,6 +127,31 @@ function drawWindow(id)
if win[id].miny < 0 then
win[id].miny = 0
end
+ if id == 4 and win[4].crazy == true then
+ if win[4].crazyLeft == true and win[4].x > 100 then
+ win[4].x = win[4].x - 10+v1.spm
+ elseif win[4].crazyLeft == false and win[4].x < sys.w-300 then
+ win[4].x = win[4].x + 10+v1.spm
+ end
+ if win[4].x <= 100 then
+ win[4].crazyLeft = false
+ elseif win[4].x >= sys.w-300 then
+ win[4].crazyLeft = true
+ end
+ if win[4].crazyUp == true and win[4].y > sys.h/2+50 then
+ win[4].y = win[4].y - 5+v1.spm
+ elseif win[4].crazyUp == false and win[4].y < sys.h-panel.thick-200 then
+ win[4].y = win[4].y + 5+v1.spm
+ end
+ if win[4].y <= sys.h/2+50 then
+ win[4].crazyUp = false
+ elseif win[4].y >= sys.h-panel.thick-200 then
+ win[4].crazyUp = true
+ end
+ if sys.mouse.drag == true then
+ win[4].crazy = false
+ end
+ end
if id == 4 then
updateAntivirus()
elseif id == 1 then