public void Init( List<GameObject> piecePrefabs ) { pieces = new List<PlayerPiece> () ; for ( int i = 0; i < 5; i++ ) { GameObject display = Instantiate ( piecePrefabs [ i ] ) as GameObject ; PlayerPiece piece = new PlayerPiece () ; piece.Init ( (Pieces)i, display ) ; piece.Visisble = false ; pieces.Add ( piece ) ; } }
public void Init(List <GameObject> piecePrefabs) { pieces = new List <PlayerPiece> (); for (int i = 0; i < 5; i++) { GameObject display = Instantiate(piecePrefabs [i]) as GameObject; PlayerPiece piece = new PlayerPiece(); piece.Init((Pieces)i, display); piece.Visisble = false; pieces.Add(piece); } }