Esempio n. 1
0
    public static void SetPSColors(EnvParalax p, Color[] colors)
    {
        ParticleSystem ps = p.transform.GetChild(0).GetComponentInChildren <ParticleSystem>();

        ParticleSystem.MainModule mm = ps.main;
        mm.startColor = new ParticleSystem.MinMaxGradient(colors[0], colors[1]);
    }
Esempio n. 2
0
 static void SetSRColorMulti(EnvParalax p, Color[] c)
 {
     new List <SpriteRenderer>(p.transform.GetChild(0).GetComponentsInChildren <SpriteRenderer>()).ForEach(sr => sr.color = Color.Lerp(c[0], c[1], Random.Range(0f, 1f)));
 }
Esempio n. 3
0
    public static void SetSRColor(EnvParalax p, Color color)
    {
        SpriteRenderer sr = p.transform.GetChild(0).GetComponent <SpriteRenderer>();

        sr.color = color;
    }