From 402e19b8bf19fb24af0fdc5b77f44088f48814ed Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 22 Aug 2016 17:24:07 +0200 Subject: initial frame delay --- button.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/button.lua b/button.lua index fc4ca8b..7262813 100644 --- a/button.lua +++ b/button.lua @@ -10,7 +10,7 @@ Button = { quad = love.graphics.newQuad(0, 0, 58,15, 68,15), arrow_l = love.graphics.newQuad(58, 0, 5, 5, 68,15), arrow_r = love.graphics.newQuad(63, 0, 5, 5, 68,15), - delay = 0, + delay = 2, parent } @@ -56,7 +56,7 @@ function Button:draw(scale) love.graphics.printf(string.upper(self.text), (x+2)*scale, (y+4)*scale, 54, "center", 0, scale, scale) end function Button:update(dt) - self.delay = (self.delay + dt)%2 + self.delay = (self.delay + dt)%Button.delay -- Button.delay is initial end function Button:controlpressed(set, action, key) if action == "attack" and self.focused then -- cgit v1.1