Ejemplo n.º 1
0
        public static void Create(Action action, float timer, string tag = null)
        {
            var components = new[] { typeof(MonoBehaviorHook) };
            var gameObject = new GameObject("FunctionDelay", components);

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

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

            timers.Add(functionTimer);
        }
Ejemplo n.º 2
0
        /*------------------------------------------------------------------*\
        |*							Class level
        \*------------------------------------------------------------------*/

        private static void RemoveTimer(FunctionDelay functionDelay)
        {
            timers.Remove(functionDelay);
        }