Example #1
0
 /// <summary>
 ///     "Empty" custom piece table with a <see cref="PieceTableConfig"/> attached.
 /// </summary>
 /// <param name="name">The name of the custom piece table.</param>
 /// <param name="config">The <see cref="PieceTableConfig"/> for this custom piece table.</param>
 public CustomPieceTable(string name, PieceTableConfig config)
 {
     PieceTablePrefab = new GameObject(name);
     PieceTable       = PieceTablePrefab.AddComponent <PieceTable>();
     config.Apply(PieceTablePrefab);
     Categories = config.GetCategories();
 }
Example #2
0
 /// <summary>
 ///     Custom piece table from a prefab with a <see cref="PieceTableConfig"/> attached.
 /// </summary>
 /// <param name="pieceTablePrefab">The prefab for this custom piece table.</param>
 /// <param name="config">The <see cref="PieceTableConfig"/> for this custom piece table.</param>
 public CustomPieceTable(GameObject pieceTablePrefab, PieceTableConfig config)
 {
     PieceTablePrefab = pieceTablePrefab;
     config.Apply(pieceTablePrefab);
     PieceTable = pieceTablePrefab.GetComponent <PieceTable>();
     Categories = config.GetCategories();
 }