Binary file not shown.
Binary file not shown.
@@ -25,6 +25,7 @@ public class GameStateManager : MonoBehaviour {
{
GameObject go = Instantiate(playerPrefab, new Vector3(2, 10, 2), Quaternion.identity) as GameObject;
go.name = "Player 1";
go.GetComponent<Renderer>().material.SetColor("_Color", new Color(Random.insideUnitCircle.x, Random.insideUnitCircle.x, Random.insideUnitCircle.x));
go.GetComponent<PlayerControl>().index = 1;
players.Add(go);
} else
@@ -33,6 +34,7 @@ public class GameStateManager : MonoBehaviour {
{
GameObject go = Instantiate(playerPrefab, new Vector3(2 * i, 10, 2 * i), Quaternion.identity) as GameObject;
go.name = "Player " + i;
go.GetComponent<Renderer>().material.SetColor("_Color", new Color(Random.insideUnitCircle.x, Random.insideUnitCircle.x, Random.insideUnitCircle.x));
go.GetComponent<PlayerControl>().index = i;
players.Add(go);
}
BIN +0 Bytes (100%) Assets/main.unity
Binary file not shown.