diff options
| -rw-r--r-- | assets.lua | 2 | ||||
| -rw-r--r-- | assets/popup_shot.png | bin | 0 -> 230397 bytes | |||
| -rw-r--r-- | var.lua | 9 | ||||
| -rw-r--r-- | virus2.lua | 23 |
4 files changed, 33 insertions, 1 deletions
@@ -124,6 +124,7 @@ function loadAssets(id) for i=1,10 do v2.pop.a[i] = love.graphics.newImage("assets/popup" .. i .. ".png") end + v2.popshot = love.graphics.newImage("assets/popup_shot.png") end if id == 10 then internet = { @@ -241,6 +242,7 @@ function loadAssets(id) v2.c.idle.fist = love.graphics.newImage("assets/virus2_hands_fist.png") v2.c.idle.f = 1 v2.c.cockgun = love.audio.newSource("assets/virus2_shotgun_cock.ogg") + v2.c.fire = love.audio.newSource("assets/virus2_shotgun_fire.ogg") v2.c.cockgunplay = false loadAnimation(v2.c.idle.pic, v2.c.idle.fs, 37, 10, 250, 250) v2.c.idle.mask = {} diff --git a/assets/popup_shot.png b/assets/popup_shot.png Binary files differnew file mode 100644 index 0000000..3494205 --- /dev/null +++ b/assets/popup_shot.png @@ -207,6 +207,12 @@ function loadVar() v2.start = false v2.startPopups = 10 v2.complete = false + v2.popshotx = sys.w/2 + v2.popshoty = sys.h/2 + v2.popshotsh = 10 + v2.popshotm = -15 + v2.popshotr = 0 + v2.popshots = false v2.c.chat = {} v2.c.chat.next = false v2.c.chat.msgs = 1 @@ -214,7 +220,8 @@ function loadVar() v2.c.chat.sp = 0.5 v2.c.chat.char = 0 v2.c.chat.time = 0 - v2.c.handp = "idle" + v2.c.handp = "gunfront" + v2.explodeFrame = 1 expl.deb[1].x = 0 expl.deb[1].y = 0 expl.deb[1].ym = 5 @@ -2,6 +2,27 @@ function drawVirusFight2() drawDesktop() drawVirus2() drawPopups() + if v2.popshoty < sys.h+1000 then + if v2.popshots == false then + v2.c.fire:play() + v2.popshots = true + end + love.graphics.setColor(256,256,256) + love.graphics.draw(v2.popshot, v2.popshotx+math.random(-v2.popshotsh,v2.popshotsh), + v2.popshoty+math.random(-v2.popshotsh,v2.popshotsh), v2.popshotr+math.rad(math.random(-v2.popshotsh,v2.popshotsh)), 1, 1, 300, 200) + if v2.popshotsh > 0 then + v2.popshotsh = v2.popshotsh - 0.5*sys.s + end + v2.popshoty = v2.popshoty + v2.popshotm*sys.s + v2.popshotm = v2.popshotm + 0.75*sys.s + v2.popshotr = v2.popshotr + math.rad(1*sys.s) + if v2.explodeFrame <= 89 then + love.graphics.setColor(255,255,255) + love.graphics.draw(expl.pic, expl.frames[math.floor(v2.explodeFrame)], sys.w/2, sys.h/2, 0, 2.5, 2.5, 320/2,240/2) + v2.explodeFrame = v2.explodeFrame + 1*sys.s + v1.explosionSound:play() + end + end if start.o == true then drawMenu() end @@ -11,6 +32,8 @@ function drawVirusFight2() v2.c.yd = sys.h/3 if v2.c.chat.msgs == 6 then v2.c.handp = "fist" + elseif v2.c.chat.msgs == 1 then + v2.c.handp = "gunfront" end elseif v2.c.chat.msgs == 2 then v2.c.xd = sys.w/3 |
