diff options
author | Aki <nthirtyone@gmail.com> | 2016-08-22 17:24:07 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2016-08-22 17:24:07 +0200 |
commit | 402e19b8bf19fb24af0fdc5b77f44088f48814ed (patch) | |
tree | 3675fde4e52bcb67ac0877b1d0ae5215280c788f | |
parent | 3aeabc496465cbd2569d9b0f5687242f374b4375 (diff) | |
download | roflnauts-402e19b8bf19fb24af0fdc5b77f44088f48814ed.zip roflnauts-402e19b8bf19fb24af0fdc5b77f44088f48814ed.tar.gz roflnauts-402e19b8bf19fb24af0fdc5b77f44088f48814ed.tar.bz2 |
initial frame delay
-rw-r--r-- | button.lua | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |