Esempio n. 1
0
 public void ChangeDriverToStunt()
 {
     if (deckFaction != PlayerCardDriver.StuntDriver)
     {
         ClearDeck();
     }
     deckBuilderBackground.SetColours(stuntColorTop, stuntColorBottom);
     deckFaction = PlayerCardDriver.StuntDriver;
 }
Esempio n. 2
0
    public IEnumerator NextGradientCoroutine()
    {
        float timer     = 0.0f;
        float lerpSpeed = 2.0f;

        while (true)
        {
            Gradient nexGrad = gradientsList[curGradIndex];

            Color topCol = groundMaterial.GetColor("_GradientTopColor");
            Color botCol = groundMaterial.GetColor("_GradientBottomColor");

            topCol = Color.Lerp(topCol, nexGrad.colorKeys[0].color, Time.deltaTime * lerpSpeed);
            botCol = Color.Lerp(botCol, nexGrad.colorKeys[nexGrad.colorKeys.Length - 1].color, Time.deltaTime * lerpSpeed);

            // get the materials colours
            groundMaterial.SetColor("_OverTopColor", topCol);
            groundMaterial.SetColor("_GradientTopColor", topCol);

            groundMaterial.SetColor("_BelowBottomColor", botCol);
            groundMaterial.SetColor("_GradientBottomColor", botCol);

            // setting ui image colours
            gameBgGradient.SetColours(topCol, botCol);

            timer += Time.deltaTime;
            yield return(new WaitForEndOfFrame());
        }
    }
Esempio n. 3
0
 private void SetColourScheme(UIPalette.CardTypeColourScheme scheme)
 {
     m_borderGradient.SetColours(scheme.BorderGradientTop, scheme.BorderGradientBottom);
     m_titleGradient.SetColours(scheme.TitleColourTop, scheme.TitleColourBottom);
     m_baseBorder.SetColours(scheme.TitleColourBottom, scheme.TitleColourTop);
     m_titleHighlight.SetColours(scheme.TitleHighlightTop, scheme.TitleHighlightBottom);
     m_numberOwnedBG1.color  = Color.black;
     m_numberOwnedBG2.color  = Color.black;
     m_cardFlavourText.color = scheme.BorderGradientBottom;
     m_cardTypeBG.color      = scheme.BorderGradientBottom;
     m_imageGradient.SetColours(scheme.BorderGradientTop, scheme.BorderGradientBottom);
 }