Ejemplo n.º 1
0
 public static void DelayCall(object key, CallbackFunction method, float seconds, bool overwrite = true)
 {
     if (!key.IsNull() && !method.IsNull())
     {
         if (seconds <= 0)
         {
             method();
             return;
         }
         if (Utility.delayedMethods.ContainsKey(key) && !overwrite)
         {
             return;
         }
         Utility.delayedMethods[key] = new KeyValuePair <CallbackFunction, float>(method, Time.realtimeSinceStartup + seconds);
     }
 }