BBGamelib.CCRepeat.update C# (CSharp) Метод

update() публичный Метод

public update ( float dt ) : void
dt float
Результат void
		public override void update (float dt)
		{
			
			if (FloatUtils.EB(dt , _nextDt))
			{
				while (FloatUtils.Big(dt , _nextDt) && _total < _times)
				{
					
					_innerAction.update(1.0f);
					_total++;
					
					_innerAction.stop();
					_innerAction.startWithTarget(_target);
					_nextDt += _innerAction.duration/_duration;
				}
				
				// fix for issue #1288, incorrect end value of repeat
				if(FloatUtils.EB(dt , 1.0f) && _total < _times) 
				{
					_total++;
				}
				
				// don't set a instantaction back or update it, it has no use because it has no duration
				if (!_isActionInstant)
				{
					if (_total == _times)
					{
						_innerAction.update(1);
						_innerAction.stop();
					}
					else
					{
						// issue #390 prevent jerk, use right update
						_innerAction.update(dt - (_nextDt - _innerAction.duration/_duration));
					}
				}
			}
			else
			{
				_innerAction.update((dt * _times) % 1.0f);
			}
		}