BBGamelib.CCActionInterval.step C# (CSharp) Method

step() public method

public step ( float dt ) : void
dt float
return void
		public override void step (float dt)
		{
			if( _firstTick ) {
				_firstTick = false;
				_elapsed = 0;
			} else
				_elapsed += dt;
			update (Mathf.Max (0,					// needed for rewind. elapsed could be negative
			            Mathf.Min (1, _elapsed /
			           		Mathf.Max (_duration, FloatUtils.Epsilon)	// division by 0
						)
						)
			        );
		}
		public override void startWithTarget (object aTarget)

Usage Example

Beispiel #1
0
        public override void step(float dt)
        {
            _innerAction.step(dt);
            if (_innerAction.isDone())
            {
                float diff = _innerAction.elapsed - _innerAction.duration;
                _innerAction.startWithTarget(_target);

                // to prevent jerk. issue #390, 1247
                _innerAction.step(0.0f);
                _innerAction.step(diff);
            }
        }
All Usage Examples Of BBGamelib.CCActionInterval::step