public override void SyncColors()
    {
        string colorTypeString = colorType.ToString();

        if (colorCustomTypes == null)
        {
            colorCustomTypes = new UIColorCustomType();
        }

        if (colorCustomTypes.ContainsKey(colorTypeString))
        {
            colorKey = colorCustomTypes.Get <string>(colorType.ToString());

            if (!string.IsNullOrEmpty(colorKey))
            {
                AppColor appColor = AppColors.Instance.GetById(colorKey);

                if (appColor != null)
                {
                    Color colorTo = appColor.GetColor();
                    colorTo.a = colorAlpha;
                    UIColors.ColorTo(
                        gameObject, colorTo);

                    foreach (Transform t in gameObject.transform)
                    {
                        UIColors.ColorTo(
                            t.gameObject, colorTo);
                    }
                }
            }
        }
    }
예제 #2
0
 public override void SyncColors()
 {
     if (!string.IsNullOrEmpty(colorKey))
     {
         Color colorTo = GameProfileCharacters.currentCustom.GetCustomColor(colorKey);
         colorTo.a = colorAlpha;
         UIColors.ColorTo(
             gameObject, colorTo);
     }
 }