using UnityEngine;
using mgaia.Utils;

namespace mgaia.tk2d
{
    /// <summary>
    /// Container de cor de um tk2dTextMesh
    /// </summary>
    /// <owner>Victor</owner>
    public class TextMeshColorContainer : IColorContainer
    {
        private tk2dTextMesh mTextMesh;

        public TextMeshColorContainer(tk2dTextMesh textMesh)
        {
            mTextMesh = textMesh;
        }

        /// <summary>
        /// Cor da textMesh
        /// </summary>
        public Color Color
        {
            get
            {
                return mTextMesh.color;
            }
            set
            {
                mTextMesh.color = value;
                mTextMesh.Commit();
            }
        }
    }
}