aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets.lua3
-rw-r--r--var.lua4
-rw-r--r--virus2.lua15
3 files changed, 22 insertions, 0 deletions
diff --git a/assets.lua b/assets.lua
index a0217a6..d5c9af1 100644
--- a/assets.lua
+++ b/assets.lua
@@ -296,6 +296,9 @@ function loadAnimation(pic, quad, frames, limit, w, h)
end
end
function playAnimation(ani, loop, x, y, r, s, xo, yo, sp)
+ if ani == v2.c.idle.mask then
+ ani.f = v2.c.idle.f
+ end
if ani.fs[math.floor(ani.f)] ~= nil then
love.graphics.draw(ani.pic, ani.fs[math.floor(ani.f)], x, y, r, s, s, xo, yo)
end
diff --git a/var.lua b/var.lua
index 786abd7..29cf685 100644
--- a/var.lua
+++ b/var.lua
@@ -193,6 +193,10 @@ function loadVar()
v2.pop.add = false
v2.pop.hov = 0
v2.msgs = {}
+ v2.c.x = 300
+ v2.c.y = 300
+ v2.c.s = 1
+ v2.c.r = 0
expl.deb[1].x = 0
expl.deb[1].y = 0
expl.deb[1].ym = 5
diff --git a/virus2.lua b/virus2.lua
index 962988a..0c85929 100644
--- a/virus2.lua
+++ b/virus2.lua
@@ -101,3 +101,18 @@ function drawPopups()
v2.pop.add = false
end
end
+function drawVirus2()
+ love.graphics.setColor(255,255,255)
+ playAnimation(v2.c.idle, true, v2.c.x, v2.c.y, v2.c.r, v2.c.s, 125, 125, 0.5)
+ love.graphics.stencil(drawVirus2Stencil, "replace", 1)
+ love.graphics.setStencilTest("greater", 0)
+ love.graphics.draw(v2.c.pupil, v2.c.x-26+math.random(-0.7,0.7),v2.c.y-57+math.random(-0.7,0.7),v2.c.r,v2.c.s)
+ love.graphics.draw(v2.c.pupil, v2.c.x+21+math.random(-0.7,0.7),v2.c.y-57+math.random(-0.7,0.7),v2.c.r,v2.c.s)
+ love.graphics.setStencilTest()
+ love.graphics.draw(v2.c.idle.hands, v2.c.x, v2.c.y, v2.c.r, v2.c.s, v2.c.s, 125, 125)
+end
+function drawVirus2Stencil()
+ love.graphics.setShader(mask_effect)
+ playAnimation(v2.c.idle.mask, true, v2.c.x, v2.c.y, v2.c.r, v2.c.s, 125, 125, 0.5)
+ love.graphics.setShader()
+end