예제 #1
0
    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 ) ;
        }
    }
예제 #2
0
    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);
        }
    }