aboutsummaryrefslogtreecommitdiff
path: root/virus2.lua
diff options
context:
space:
mode:
author1029chris <1029chris@gmail.com>2016-08-11 22:52:16 -0700
committer1029chris <1029chris@gmail.com>2016-08-11 22:52:16 -0700
commit91e56388125d82bfea5b6b38aec9e6fc7f3f398a (patch)
tree41b17f2ab71922175da16b6e65e53f79a61df91e /virus2.lua
parentfad9d9391f1880dfb0c116c520911538176321f3 (diff)
Virus 2 Dialogue plays now
Diffstat (limited to 'virus2.lua')
-rw-r--r--virus2.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/virus2.lua b/virus2.lua
index d8afeea..5c9a634 100644
--- a/virus2.lua
+++ b/virus2.lua
@@ -129,6 +129,23 @@ function drawVirus2()
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)
+ if v2.c.chat.time >= 2 then
+ drawBubble(v2.c.x+50, v2.c.y-160, 300, 115, v2.c.chat.msg)
+ if mouseClick(v2.c.x+50,v2.c.y-160,300,110) == true and v2.c.chat.next == false then
+ v2.c.chat.next = true
+ v2.c.chat.msgs = v2.c.chat.msgs + 1
+ v2.c.chat.char = 0
+ v2.c.chat.msg = ""
+ end
+ if v2.msgs[v2.c.chat.msgs] ~= nil then
+ if string.len(v2.msgs[v2.c.chat.msgs]) ~= string.len(v2.c.chat.msg) then
+ v2.c.chat.char = v2.c.chat.char + v2.c.chat.sp*(60/love.timer.getFPS())
+ v2.c.chat.msg = string.sub(v2.msgs[v2.c.chat.msgs], 1, math.floor(v2.c.chat.char))
+ end
+ end
+ else
+ v2.c.chat.time = v2.c.chat.time + delta
+ end
end
function drawVirus2Stencil()
love.graphics.setShader(mask_effect)