protected virtual void SetIcon(CharacterColorTheme colorTheme) { ColorTheme = colorTheme; ValueChanged?.Invoke(colorTheme); if (colorTheme != null) image.color = colorTheme.IconBackgroundColor; }
protected virtual void Update() { if (lastColorThemeName == colorThemeIndex) { return; } lastColorThemeName = colorThemeIndex; colorTheme = CharacterColorThemeManager.GetColorTheme(colorThemeIndex); Toggle.image.color = ColorTheme.IconBackgroundColor; }
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); }
public override void Display(CharacterColorTheme colorTheme) => SetIcon(colorTheme);
public abstract void Display(CharacterColorTheme colorTheme);
protected virtual void OnOptionSelected(CharacterColorTheme colorTheme) => CurrentColorTheme = colorTheme;
public abstract WaitableTask <CharacterColorTheme> SelectColorTheme(CharacterColorTheme colorTheme);