TintSprite.cs 714 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace CommonUnity3D.UGUI
  6. {
  7. public class TintSprite : DisplayNode
  8. {
  9. private readonly ImageGraphics mImage;
  10. public TintSprite(string name = "") : base(name)
  11. {
  12. this.mImage = mGameObject.AddComponent<ImageGraphics>();
  13. this.mImage.color = UnityEngine.Color.white;
  14. this.Enable = false;
  15. this.EnableChildren = false;
  16. }
  17. public ImageGraphics Graphics { get { return mImage; } }
  18. public UnityEngine.Color Color
  19. {
  20. get { return mImage.color; }
  21. set { mImage.color = value; }
  22. }
  23. }
  24. }