Esempio n. 1
0
    /// <summary>
    /// Inits the audio status.
    /// </summary>
    public void initThemeStatus()
    {
        isDarkTheme = (PlayerPrefs.GetInt("isDarkTheme", ((isDarkTheme) ? 0 : 1)) == 0) ? true : false;

        if ((!isDarkTheme) && (OnThemeChangedEvent != null))
        {
            OnThemeChangedEvent.Invoke(isDarkTheme);
        }
    }
Esempio n. 2
0
    /// <summary>
    /// Toggles the sound status.
    /// </summary>
    /// <param name="state">If set to <c>true</c> state.</param>
    public void ToggleThemeStatus(bool state)
    {
        isDarkTheme = state;
        PlayerPrefs.SetInt("isDarkTheme", (isDarkTheme) ? 0 : 1);

        if (OnThemeChangedEvent != null)
        {
            OnThemeChangedEvent.Invoke(isDarkTheme);
        }
    }