示例#1
0
        /// <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);
        }
示例#2
0
        /// <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);
        }
示例#3
0
 public DelayItem(float duration, int repeat, ItemFinishHandler finishHandler) : base()
 {
     repeatedCount = 0;
     targetRepeats = 0;
     Duration      = duration;
     RepeatCount   = repeat;
     OnItemFinish  = finishHandler;
 }