Ejemplo n.º 1
0
 static void RegisterInCallerOverTime(FunctionAndParams p_struct, float p_time)
 {
     if (p_struct != null)
     {
         if (p_time <= 0)
         {
             p_struct.CallFunction();
         }
         else
         {
             FunctionsToCallOverTime.AddChecking(p_time, p_struct);
         }
     }
 }
Ejemplo n.º 2
0
        public static void CallFunction(System.Delegate p_functionPointer, object[] p_params, float p_time, bool p_forceCreateInstance = true)
        {
#if UNITY_EDITOR
            Init();
#else
            if (p_forceCreateInstance)
            {
                TryCreateInstance();
            }
#endif
            FunctionAndParams v_newStruct = new FunctionAndParams();
            v_newStruct.DelegatePointer = p_functionPointer;
            v_newStruct.Params          = p_params != null ? new List <object>(p_params) : new List <object>();
            v_newStruct.Target          = null;
            if (p_time <= 0)
            {
                p_time = 0.001f;
            }
            RegisterInCallerOverTime(v_newStruct, p_time);
        }