예제 #1
0
 private void CreatePiecesFromLayout(BoardLayout layout)
 {
     for (int i = 0; i < layout.GetPiecesCount(); i++)
     {
         Vector2Int squareCoords = layout.GetSquareCoordsAtindex(i);
         TeamColor  team         = layout.GetSquareTeamColorAtIndex(i);
         string     typeName     = layout.GetSquarePieceNameAtIndex(i);
         CreatePieceAndInitialize(squareCoords, team, typeName);
     }
 }