From 4bcaf1770c0aa693e24359ee52f7552f301917d3 Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 22 Aug 2016 18:17:08 +0200 Subject: Faster --- button.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/button.lua b/button.lua index 7262813..f221cda 100644 --- a/button.lua +++ b/button.lua @@ -56,7 +56,10 @@ 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)%Button.delay -- Button.delay is initial + self.delay = self.delay + dt + if self.delay < Button.delay then -- Button.delay is initial + self.delay = self.delay - Button.delay + end end function Button:controlpressed(set, action, key) if action == "attack" and self.focused then -- cgit v1.1