private void ChangeColor() { var sprite = gameObject.transform.Find("Background").GetComponentInChildren <SpriteRenderer>(); if (CurrentColorStates.Any()) { sprite.color = Color.yellow; } else // HighlightState.DEFAULT or nothing { sprite.color = Color.white; } }
private void ChangeColor() { var sprite = GetComponentInChildren <SpriteRenderer>(); if (CurrentColorStates.Any()) { sprite.color = Color.yellow; } else // HighlightState.DEFAULT or nothing { sprite.color = ColorConst.LightOrangeBrown; } }