ImageMonetColorer.cs 421 B

123456789101112131415161718
  1. using UnityEngine;
  2. using UnityEngine.UI;
  3. namespace Smoothie.MonetColors.Runtime
  4. {
  5. [RequireComponent(typeof(Image))]
  6. public class ImageMonetColorer : MonetColorer
  7. {
  8. public override void UpdateColor()
  9. {
  10. base.UpdateColor();
  11. var component = GetComponent<Image>();
  12. _colorValue.a = component.color.a;
  13. component.color = _colorValue;
  14. }
  15. }
  16. }