You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jan-Ole Schümann edited this page Oct 6, 2018
·
5 revisions
Static Method DelayedCall
DC DelayedCall(float delay, Action callback, bool useFrames = false)
DC DelayedCall(float delay, Action<object> callback, object pars, bool useFrames = false)
DelayedCall allows to call a method after a certain delay. It can be used both with and without an argument that is passed to the method.
DelayedCall returns a DC object which allows to terminate the delayed call using the Kill() method of the DC object.
If useFrames is set to true, time is specified in frames instead of seconds.
Example
In this example, the method onDelay is called after 2 seconds with a GameObject passed as a parameter.