Gamesparks and timer module update

This function is from my old timer extension. When we released an official timer that was part of the Defold engine it was also given the module namespace timer which conflicted with mine. I see that there is a PR to fix this: https://bitbucket.org/gamesparks/gamesparks-defold/pull-requests/2/change-timer-to-delay-as-the-extension/diff

The best solution would be if Gamesparks dropped the use of my timer extension completely and used the official native Defold timer.

You have a few options:

  1. Fork the repository and make the change yourself
  2. Add a timer.seconds() function yourself and forward calls to that function to either my native extension timer (delay.seconds) or the internal Defold timer (timer.delay):

Add this to a script early on in your code:

timer.seconds = function(seconds, fn)
	return timer.delay(seconds, true, fn)
end
1 Like