BBGamelib.CCRotateTo.startWithTarget C# (CSharp) Method

startWithTarget() public method

public startWithTarget ( object aTarget ) : void
aTarget object
return void
		public override void startWithTarget (object aTarget)
		{
			base.startWithTarget (aTarget);
			
			//Calculate angle
			_startAngle = ((CCNode)_target).rotation;
			if (FloatUtils.Big(_startAngle , 0))
				_startAngle = _startAngle % 360.0f;
			else
				_startAngle = _startAngle % -360.0f;
			
			_diffAngle = _dstAngle - _startAngle;
			if (FloatUtils.Big(_diffAngle , 180))
				_diffAngle -= 360;
			if (FloatUtils.Small(_diffAngle , -180))
				_diffAngle += 360;
		}