diff options
| author | 1029chris <1029chris@gmail.com> | 2016-04-30 12:07:16 -0700 |
|---|---|---|
| committer | 1029chris <1029chris@gmail.com> | 2016-04-30 12:07:16 -0700 |
| commit | cbdaf588f0d5130ec63e0cfcd90bcaa2d6884b10 (patch) | |
| tree | a349c896e4e531a48edc2a9c96ab5dc8d3c9ae71 | |
| parent | 1fed4cc8b402af75f785c28b5a3dd879a318c9cc (diff) | |
Monitor size optimizations
Some fixes
| -rw-r--r-- | virus1.lua | 6 | ||||
| -rw-r--r-- | window.lua | 12 |
2 files changed, 9 insertions, 9 deletions
@@ -267,14 +267,14 @@ function drawVirusFight1() -math.sin(v1.turret[i].r+math.rad(90))*(v1.turret[i].y-v1.turret[i].y)+v1.turret[i].x local y = math.sin(v1.turret[i].r+math.rad(90))*(v1.turret[i].x+148-v1.turret[i].x) +math.cos(v1.turret[i].r+math.rad(90))*(v1.turret[i].y-v1.turret[i].y)+v1.turret[i].y - addBullet(x,y,v1.turret[i].r+math.rad(90),6*(0.75+(v1.spm/4)),"v1",i) + addBullet(x,y,v1.turret[i].r+math.rad(90),(6*(0.75+(v1.spm/4)))*(1080/sys.h),"v1",i) if v1.laserSound:isPlaying() == true then v1.laserSound:rewind() else v1.laserSound:play() end v1.turret[i].t = 0 - v1.turret[i].tl = (math.random(2,5)/v1.spm)*2 + v1.turret[i].tl = ((math.random(2,5)/v1.spm)*2)*(1080/sys.h) elseif v1.turret[i].t < v1.turret[i].tl and v1.turretTimer < 30 then v1.turret[i].t = v1.turret[i].t+delta end @@ -524,7 +524,7 @@ function drawBullets() if av.bullets[i].x >= v1.c.x-615/2 and av.bullets[i].x <= v1.c.x-615/2+615 and av.bullets[i].y >= v1.c.y-100+20 and av.bullets[i].y <= v1.c.y-100+20+200 and v1.c.chat.msgs > 35 then v1.c.health = v1.c.health - 5 - v1.spm = v1.spm + 0.2 + v1.spm = v1.spm + 0.2*(1080/sys.h) av.bullets[i].rm = true if antivirus.hit:isPlaying() == true then antivirus.hit:rewind() @@ -128,9 +128,9 @@ function drawWindow(id) 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 + 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 + 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 @@ -138,10 +138,10 @@ function drawWindow(id) 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 + if win[4].crazyUp == true and win[4].y >= sys.h/2+50 then + win[4].y = win[4].y - 6+v1.spm + elseif win[4].crazyUp == false and win[4].y <= sys.h-panel.thick-200 then + win[4].y = win[4].y + 6+v1.spm end if win[4].y <= sys.h/2+50 then win[4].crazyUp = false |
