/// <summary> /// Creates a new item that provides a delayed callback after specified duration. /// </summary> public static Item CreateDelay(float duration, int repeat, ItemFinishHandler finishHandler) { DelayItem item = new DelayItem(duration, repeat, finishHandler); RegisterItem(item); return(item); }
/// <summary> /// Creates a new item that provides a callback event after a frame. /// </summary> public static Item CreateFrameDelay(ItemFinishHandler finishHandler) { DelayItem item = new DelayItem(0f, 0, finishHandler); RegisterItem(item); return(item); }
public DelayItem(float duration, int repeat, ItemFinishHandler finishHandler) : base() { repeatedCount = 0; targetRepeats = 0; Duration = duration; RepeatCount = repeat; OnItemFinish = finishHandler; }