protected override List <Piece> GenerateStage(StageData stageData) { List <string> partNameList = exerciseLoader.GetPieceList(stageData).ToList(); if (partNameList.Count == 0) { return(null); } List <Piece> pieceList = new List <Piece> (); for (int i = 0; i < kanjiFields.Length; i++) { KanjiPiece kanjiPiece = Instantiate(piecePrefab, kanjiFieldTransform); kanjiPiece.StartParent = kanjiFields[i]; KanjiData kanjiData = kanjiPiece.GetKanjiData(); kanjiData.SetKanji(partNameList[i]); pieceList.Add(kanjiPiece); NetworkServer.Spawn(kanjiPiece.gameObject); } return(pieceList); }
public KanjiData(KanjiPiece piece) { this.kanjiPiece = piece; }