My first question is regarding taskManager’s arguments.
I was surprized when I used it like this:
taskMgr.doMethodLater(3,self.initGame,"initGame",extraArgs = [room])
that arguments take place of the elapsed/task keyword I was supposed to add.
Indeed, I firstly was tented to write something like this
def initGame(self,task,room): room.startGame() return Task.done
which generate an error while this works:
def initGame(self,room): #APPARENTLY "task" IS NOT NEEDED HERE room.startGame() return Task.done
This confused me and I’m wondering (even no errors) if the second def is correct.
If yes, how can I call globalClock.getDt() ?
Second question is related to intervals and functions against taskMgr.
Sometimes, I’m hesitating about which one to use… Using Func within intervals can do the same thing than taskMgr so what’s the border between them ?