summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-08-22 17:24:07 +0200
committerAki <nthirtyone@gmail.com>2016-08-22 17:24:07 +0200
commit402e19b8bf19fb24af0fdc5b77f44088f48814ed (patch)
tree3675fde4e52bcb67ac0877b1d0ae5215280c788f
parent3aeabc496465cbd2569d9b0f5687242f374b4375 (diff)
downloadroflnauts-402e19b8bf19fb24af0fdc5b77f44088f48814ed.zip
roflnauts-402e19b8bf19fb24af0fdc5b77f44088f48814ed.tar.gz
roflnauts-402e19b8bf19fb24af0fdc5b77f44088f48814ed.tar.bz2
initial frame delay
-rw-r--r--button.lua4
1 files 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