Beispiel #1
0
    public static bool QueueOrExecute(IInterpTimedEventReceiver receiver, bool immediate, string tag, ref uLink.NetworkMessageInfo info, params object[] args)
    {
        UnityEngine.MonoBehaviour monoBehaviour    = receiver as UnityEngine.MonoBehaviour;
        InterpTimedEvent          interpTimedEvent = InterpTimedEvent.New(monoBehaviour, tag, ref info, args, immediate);

        if (interpTimedEvent == null)
        {
            return(false);
        }
        if (immediate)
        {
            InterpTimedEvent.InvokeDirect(interpTimedEvent);
        }
        else if (!InterpTimedEventSyncronizer.available)
        {
            Debug.LogWarning(string.Concat("Not running event because theres no syncronizer available. ", tag), receiver as UnityEngine.Object);
            return(false);
        }
        return(true);
    }