UMD.HCIL.Piccolo.PNode.AnimateToColor C# (CSharp) Method

AnimateToColor() public method

Animate this node's color from its current value to the new value specified.
This method assumes that this nodes Brush property is of type SolidBrush. If this node descends from the root then the activity will be scheduled, else the returned activity should be scheduled manually. If two different color activities are scheduled for the same node at the same time, they will both be applied to the node, but the last one scheduled will be applied last on each frame, so it will appear to have replaced the original. Generally you will not want to do that.
public AnimateToColor ( Color destColor, long duration ) : PColorActivity
destColor Color The final color value.
duration long The amount of time that the animation should take.
return UMD.HCIL.Piccolo.Activities.PColorActivity
		public virtual PColorActivity AnimateToColor(Color destColor, long duration) {
			PColorActivity.Target t = new PNodeColorTarget(this);

			if (duration == 0) {
				t.Color  = destColor;
				return null;
			}

			PColorActivity ca = new PColorActivity(duration, PUtil.DEFAULT_ACTIVITY_STEP_RATE, t, destColor);
			AddActivity(ca);
			return ca;
		}