dimanche 23 avril 2017

how can i deploy 2 colors on 42 sprites randomly?

i am making a RISK game in unity , i have 42 sprites of countries, and i have to deploy color on them , for example for 2 players 21 green and 21 red , how can i deploy randomly ? (i am new to unity C# ) how can i deploy deploy via C# coding

        {
          this.GetComponent<SpriteRenderer>().color = Color.green;
        }
        else
        {

            this.GetComponent<SpriteRenderer>().color = Color.red;
        }




Aucun commentaire:

Enregistrer un commentaire