Пример #1
0
    /// <summary>
    /// Returns the corresponding color to the selected colorType used for the scene.
    /// Either the basecolor for UI objects, the planet color for the planet material
    /// or the particle color for the snake particle.
    /// </summary>
    public Color GetColorByColorType(PurchaseableColorType purchaseableColorType)
    {
        switch (purchaseableColorType)
        {
        case PurchaseableColorType.BASE:
            return(new Color(baseColor[0], baseColor[1], baseColor[2], baseColor[3]));

        case PurchaseableColorType.PLANET:
            return(new Color(planetColor[0], planetColor[1], planetColor[2], planetColor[3]));

        case PurchaseableColorType.PARTICLE:
            return(new Color(particleColor[0], particleColor[1], particleColor[2], particleColor[3]));

        default:
            return(Color.white);
        }
    }
Пример #2
0
 public Color GetColorByPurchaseableColorIndex(PurchaseableColorType purchaseableColorType, int index)
 {
     return(colorObjectList[index].GetColorByColorType(purchaseableColorType));
 }
Пример #3
0
 public Color GetColorByPurchaseableColorType(PurchaseableColorType purchaseableColorType)
 {
     return(colorObjectList[(int)currentColor].GetColorByColorType(purchaseableColorType));
 }