BBGamelib.CCMoveBy.update C# (CSharp) Method

update() public method

public update ( float t ) : void
t float
return void
		public override void update (float t)
		{
			CCNode node = (CCNode)_target;		
			bool stackable = ccConfig.CC_ENABLE_STACKABLE_ACTIONS;
			if(stackable){
				Vector2 currentPos = node.position;
				Vector2 diff = currentPos - _previousPos;
				_startPos = _startPos + diff;
				Vector2 newPos = _startPos + _positionDelta * t;
				node.position = newPos;
				_previousPos = newPos;
			} else {
				node.position = _startPos + _positionDelta * t;
			}
		}
	}