public Class1() { var c = new UnityEngine.Color(0.3f, 0.4f, 0.6f, 0.7f { caret });
protected override void Apply() { if (!toAlpha.HasValue && !toRed.HasValue && !toGreen.HasValue && !toBlue.HasValue) { if (targetGraphic) { To(targetGraphic !.color); } else if (targetSprite) { To(targetSprite !.color); } else if (meshRenderer) { To(meshRenderer !.material.color); } else if (canvasGroup) { To(new UnityEngine.Color(1f, 1f, 1f, canvasGroup !.alpha)); } } if (!fromAlpha.HasValue && !fromRed.HasValue && !fromGreen.HasValue && !fromBlue.HasValue) { if (targetGraphic) { From(targetGraphic !.color); } else if (targetSprite) { From(targetSprite !.color); } else if (meshRenderer) { From(meshRenderer !.material.color); } else if (canvasGroup) { From(new UnityEngine.Color(1f, 1f, 1f, canvasGroup !.alpha)); } } var color = UnityEngine.Color.white; if (targetGraphic) { color = targetGraphic !.color; } if (targetSprite) { color = targetSprite !.color; } if (meshRenderer) { color = meshRenderer !.material.color; } if (canvasGroup) { color = new UnityEngine.Color(1f, 1f, 1f, canvasGroup !.alpha); } if (fromAlpha.HasValue && toAlpha.HasValue) { color.a = function.Invoke(fromAlpha.Value, toAlpha.Value, NormalizdElapsedTime); } if (fromRed.HasValue && toRed.HasValue) { color.r = function.Invoke(fromRed.Value, toRed.Value, NormalizdElapsedTime); } if (fromGreen.HasValue && toGreen.HasValue) { color.g = function.Invoke(fromGreen.Value, toGreen.Value, NormalizdElapsedTime); } if (fromBlue.HasValue && toBlue.HasValue) { color.b = function.Invoke(fromBlue.Value, toBlue.Value, NormalizdElapsedTime); } if (targetGraphic) { targetGraphic !.color = color; } else if (targetSprite) { targetSprite !.color = color; } else if (meshRenderer) { meshRenderer !.material.color = color; } else if (canvasGroup) { canvasGroup !.alpha = color.a; } }