void ColorSquares(Color color)
    {
        var squaresList   = squaresContainer.GetChildren().Cast <ColorRect>().ToList <ColorRect>();
        var filledSquares = dinoInfo.GetLevel(statButtonMode);

        if (statButtonMode == s.Hp)
        {
            color = hpRed;
        }
        else if (statButtonMode == s.Delay)
        {
            color = delayBlue;
        }

        for (int i = 0; i < filledSquares; i++)
        {
            if (filledSquares == maxSquares)
            {
                squaresList[i].Color = new Color(0, 1, 0, 1);
            }
            else
            {
                squaresList[i].Color = color;
            }
        }
    }
Beispiel #2
0
 public int GetUpgradeCost()
 {
     return(UpgradeInfo.GetLevel(Level + 1).BaseStats.cost);
 }