Exemplo n.º 1
0
    /// <summary>
    /// Returns a visual style that matches the input aesthetic.
    /// </summary>
    /// <param name="_aesthetic">Aesthetic of the style you want returned.</param>
    /// <returns></returns>
    VisualStyle GetStyle(Aesthetic _aesthetic)
    {
        for (int indexA = 0; indexA < styles.Count; ++indexA)
        {
            if (styles[indexA].aesthetic == _aesthetic)
            {
                return(styles[indexA]);
            }
        }

        Debug.LogWarning("Style with aesthetic " + _aesthetic + " does not exist!");

        return(styles[0]);
    }
Exemplo n.º 2
0
    /// <summary>
    /// Sets the current aesthetic to the input, then updates all instant aspects of the game's visual style.
    /// </summary>
    /// <param name="_aesthetic">The aesthetic to be set.</param>
    public void SetAesthetic(Aesthetic _aesthetic)
    {
        //Disable the current particles.
        curStyle.particleObject.SetActive(false);

        //Update Style info
        curStyle     = GetStyle(_aesthetic);
        curAesthetic = _aesthetic;

        //Update all the relevant UI to match style.
        impactUI.SetFont(curStyle.impactFont);
        impactUI.SetAnimString(curStyle.impactAnim);

        pointsUI.font      = curStyle.font;
        instructionUI.font = curStyle.font;

        curStyle.particleObject.SetActive(true);

        SetActiveWordFonts();
    }