Happy new year guys, hope it’ll be a great one for Defold and everyone here!
And… here is my first issue of the year!
(this may not be a bug at all… you tell me)
When I want to use a parameter in the gui.animate’s callback function, this function is triggered not when the animation is over but when it starts
function update(self, dt)
gui.animate(node_test, hash("position.y"), anim_pos_target_y, gui.EASING_OUTELASTIC, anim_duration, 0, function_test, gui.PLAYBACK_ONCE_FORWARD)
end
=> OK / function called when the anim ends
function update(self, dt)
gui.animate(node_test, hash("position.y"), anim_pos_target_y, gui.EASING_OUTELASTIC, anim_duration, 0, function_test(value), gui.PLAYBACK_ONCE_FORWARD)
end
=> KO / function called when the anim starts
In both cases, the function is called, but… in the second case (function parameter), not at the right moment.
The (super simple) local function looks like this:
local function function_test(value)
print("value = "..value)
end
Have I done something wrong?