diff options
author | Aki <nthirtyone@gmail.com> | 2016-08-22 18:17:08 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2016-08-22 18:17:08 +0200 |
commit | 4bcaf1770c0aa693e24359ee52f7552f301917d3 (patch) | |
tree | 56bad8ede42aea0332c32edc41bd3c35209b728a | |
parent | 402e19b8bf19fb24af0fdc5b77f44088f48814ed (diff) | |
download | roflnauts-4bcaf1770c0aa693e24359ee52f7552f301917d3.zip roflnauts-4bcaf1770c0aa693e24359ee52f7552f301917d3.tar.gz roflnauts-4bcaf1770c0aa693e24359ee52f7552f301917d3.tar.bz2 |
Faster
-rw-r--r-- | button.lua | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 |