Your recoil
function is expecting an argument to be passed into it (delta
). However, that's not being passed in due to the way you've wired the timeout
function. If you don't need the delta
argument, remove it from the function definition. If you do need it, then pass it in like:
timer.connect("timeout", self, "recoil", [delta])