public override void startWithTarget(object aTarget) { base.startWithTarget(aTarget); CCRGBAProtocol tn = (CCRGBAProtocol)_target; _from = tn.color; }
public override void update(float t) { CCRGBAProtocol tn = (CCRGBAProtocol)_target; tn.color = new Color32((byte)Mathf.RoundToInt(_fromR + _deltaR * t), (byte)Mathf.RoundToInt(_fromG + _deltaG * t), (byte)Mathf.RoundToInt(_fromB + _deltaB * t), 1); }
public override void update(float t) { CCRGBAProtocol tn = (CCRGBAProtocol)_target; tn.color = new Color32((byte)Mathf.RoundToInt(_from.r + (_to.r - _from.r) * t), (byte)Mathf.RoundToInt(_from.g + (_to.g - _from.g) * t), (byte)Mathf.RoundToInt(_from.b + (_to.b - _from.b) * t), 1); }
public override void startWithTarget(object aTarget) { base.startWithTarget(aTarget); CCRGBAProtocol tn = (CCRGBAProtocol)_target; Color32 color = tn.color; _fromR = color.r; _fromG = color.g; _fromB = color.b; }