Beispiel #1
0
        public static void Create(Action action, float timer, int ticks = 0, string tag = null)
        {
            var components = new[] { typeof(MonoBehaviorHook) };
            var gameObject = new GameObject("FunctionInterval", components);

            var functionTimer = new FunctionInterval(action, timer, tag, gameObject, ticks);

            gameObject.GetComponent <MonoBehaviorHook>().SetAction(functionTimer.Update);

            timers.Add(functionTimer);
        }
Beispiel #2
0
        /*------------------------------------------------------------------*\
        |*							Class level
        \*------------------------------------------------------------------*/

        private static void RemoveTimer(FunctionInterval functionTimer)
        {
            timers.Remove(functionTimer);
        }