diff options
| author | 1029chris <1029chris@gmail.com> | 2016-04-30 01:04:16 -0700 |
|---|---|---|
| committer | 1029chris <1029chris@gmail.com> | 2016-04-30 01:04:16 -0700 |
| commit | 1fed4cc8b402af75f785c28b5a3dd879a318c9cc (patch) | |
| tree | 3165cb10c6ac77f7d00cea5725f02b0a0893e502 /window.lua | |
| parent | a7fc16d026ff6baf51e082eeee0d79f0195729c4 (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.lua | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -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 |
