示例#1
0
 public MTimerData(MTimerData timerData)
 {
     this.day    = timerData.day;
     this.house  = timerData.house;
     this.minute = timerData.minute;
     this.second = timerData.second;
 }
示例#2
0
        /// <summary>
        /// 具有时间延迟
        /// </summary>
        /// <param name="startTime">开始时间.</param>
        /// <param name="start">开始事件</param>
        /// <param name="duration">时长</param>
        /// <param name="end">结束事件</param>
        public MTimer(float startTime = 0, Action start = null, Action <MTimerValue, float> timerValue = null, Action end = null, float timeSpeed = 1)
        {
            this.startTime = startTime;
            this.onStart   = start;

            this.duration = new MTimerData
            {
                second = -1
            };

            this.onEnd = end;

            TimeSpeed = timeSpeed;
            sumTime   = 0;

            IsPlaying = false;
            IsPaurse  = false;

            TimerValues = timerValue;

            MTimerController.Timers.Add(this);
        }