/// <summary> /// Change the color of this game object /// </summary> public bool SetColor(GameColor newColor, bool animation = true) { if (!CanChangeColor(newColor)) { return(false); } _previousColor = _color; _color = newColor; gameObject.layer = _colorsManager.GetLayer(this._color); if (animation) { colorAnimationManager.StartAnimation(); } else { DoUpdateColor(_colorsManager.GetColor(Color)); } return(true); }