Exemplo n.º 1
0
    public static TimerObject SetTimeout(float delay, Callback cb, bool loop = false, [CallerMemberName] string callerName = "", [CallerFilePath] string memberName = "")
    {
        GameObject  t     = new GameObject($"[{L.GetClassName(memberName)}.{callerName}] TimerObject: " + delay.ToString() + " seconds (" + Random.Range(1, 200).ToString() + ")");
        TimerObject timer = t.AddComponent <TimerObject>();

        timer.loop = loop;
        timer.SetTimeout(delay, cb);
        return(timer);
    }