//------------------------------------------------------------------ public static void Create(float interval, int iterationsLimit, Action trigger, Action finish = null) { Loop timer = new Loop {Interval = interval, IterationsLimit = iterationsLimit, Trigger = trigger}; timer.Finish += finish; Manager.Add (timer); }
//------------------------------------------------------------------ private void CreateBlinker() { timer = new Loop(); timer.Interval = 0.5f; timer.IterationsLimit = 10; timer.Trigger = Turn; timer.Finish += Disable; }
//------------------------------------------------------------------ public override void Disable() { base.Disable(); timer = null; }