示例#1
0
 public CycleAni SetTime(double seconds)
 {
     _seconds = (float)seconds;
     if (_timeProvider != null)
     {
         _time.ChangeTimeProvider(_timeProvider);
     }
     _time.SetTime(_seconds);
     return(this);
 }
示例#2
0
        public override void Initialize()
        {
            _init?.Invoke(this);
            if (_seconds < 0.00001)
            {
                _range.SetTime(0);
                Update();
                Finish();
                return;
            }

            if (_timeProvider != null)
            {
                _range.ChangeTimeProvider(_timeProvider);
            }
            _range.SetTime(_seconds);
        }
示例#3
0
 public override void Initialize()
 {
     if (_seconds <= 0.0001)
     {
         if (_seconds < 0)
         {
             IsForcedToFinish = true;
             ClearAllFollowUpActions();
             Finish();
         }
         else
         {
             Finish();
         }
         return;
     }
     if (_timeProvider != null)
     {
         _time.ChangeTimeProvider(_timeProvider);
     }
     _time.SetTime(_seconds);
 }