Found this in the FPS-Tutorial, in the DamageReceiver.js: Is
the same as:
? Or am I missing some siginficant detail here?
Thanks & Greetz, Ky.
The two examples you gave would give identical results. However, if you placed a piece of code afterwards, with Invoke it will get executed immediately, whereas with the yield it will be delayed as well.
For example, with this function, someOtherFunction will be called immediately, and DelayedDetonate will be called after detonationDelay seconds.
Whereas with this function, DelayedDetonate will be called after detonationDelay seconds, and someOtherFunction will be called right after DelayedDetonate.
Also, you cannot pass arguments using Invoke.