using UnityEngine;

namespace mgaia.Utils
{
    /// <summary>
    /// Representa um gameobject que contém uma cor
    /// </summary>
    /// <owner>Victor</owner>
    public class GameObjectColorContainer : IColorContainer
    {
        private GameObject mGameObject;

        public GameObjectColorContainer(GameObject gameObject)
        {
            mGameObject = gameObject;
        }

        public Color Color
        {
            get
            {
                return mGameObject.renderer.material.color;
            }
            set
            {
                mGameObject.renderer.material.color = value;
            }
        }
    }
}