示例#1
0
 public static void Add(DelayedDelegateFloat method, float param, float delay)
 {
     PreAdd();
     delayedDelegatesFloat.Add(method);
     delayedDelegatesTimeFloat.Add(Time.fixedTime + delay);
     delegateParametersFloat.Add(param);
 }
示例#2
0
    public static void RunAll(DelayedDelegateFloat method)
    {
        for (int x = delayedDelegatesFloat.Count - 1; x >= 0; x--)
        {
            if (delayedDelegatesFloat[x] == method)
            {
                delayedDelegatesTimeFloat[x] = Time.fixedTime;
            }
        }

        DelayedDelegates.RunDelegates();
    }
示例#3
0
 public static void RemoveAll(DelayedDelegateFloat method)
 {
     for (int x = delayedDelegatesFloat.Count - 1; x >= 0; x--)
     {
         if (delayedDelegatesFloat[x] == method)
         {
             delayedDelegatesFloat.RemoveAt(x);
             delayedDelegatesTimeFloat.RemoveAt(x);
             delegateParametersFloat.RemoveAt(x);
         }
     }
 }