コード例 #1
0
 protected virtual void SetIcon(CharacterColorTheme colorTheme)
 {
     ColorTheme = colorTheme;
     ValueChanged?.Invoke(colorTheme);
     if (colorTheme != null)
         image.color = colorTheme.IconBackgroundColor;
 }
コード例 #2
0
        protected virtual void Update()
        {
            if (lastColorThemeName == colorThemeIndex)
            {
                return;
            }

            lastColorThemeName = colorThemeIndex;
            colorTheme         = CharacterColorThemeManager.GetColorTheme(colorThemeIndex);
            Toggle.image.color = ColorTheme.IconBackgroundColor;
        }
コード例 #3
0
        public override WaitableTask <CharacterColorTheme> SelectColorTheme(CharacterColorTheme colorTheme)
        {
            CurrentColorThemeTask?.SetError(new Exception("New popup opened"));
            CurrentColorThemeTask = new WaitableTask <CharacterColorTheme>();

            gameObject.SetActive(true);

            if (ColorThemeOptions.ContainsKey(colorTheme))
            {
                ColorThemeOptions[colorTheme].Select();
            }

            CurrentColorTheme = colorTheme;

            return(CurrentColorThemeTask);
        }
コード例 #4
0
 public override void Display(CharacterColorTheme colorTheme) => SetIcon(colorTheme);
コード例 #5
0
 public abstract void Display(CharacterColorTheme colorTheme);
コード例 #6
0
 protected virtual void OnOptionSelected(CharacterColorTheme colorTheme) => CurrentColorTheme = colorTheme;
コード例 #7
0
 public abstract WaitableTask <CharacterColorTheme> SelectColorTheme(CharacterColorTheme colorTheme);