Example #1
0
        public static void EInvokeRepeating(this  MonoBehaviour self, string methodKey, float delay, float repeatTime, System.Action callback)
        {
            InvokeHelper helper = self.GetComponent <InvokeHelper> ();

            if (helper == null)
            {
                helper = self.gameObject.AddComponent <InvokeHelper> ();
            }
            if (helper.enabled == false)
            {
                helper.enabled = true;
            }
            helper.HelperInvokeRepeating(self, methodKey, delay, repeatTime, callback);
        }