Beispiel #1
0
    TSGamePiece spawnPiece(StimuliSet set)
    {
        toggleAllPiecesVisible(isVisible: false);
        TSGamePiece piece      = choosePieceToSpawn();
        int         pieceIndex = ArrayUtil.IndexOf(boardPieces, piece);

        this.activeTile = boardTiles[pieceIndex];
        piece.SetPiece(batch, set);
        activeTile.SetPiece(piece);
        this.currentTask = trackTask(set, pieceIndex);
        return(piece);
    }
Beispiel #2
0
 TSGamePiece[] spawnPieces(bool startActive)
 {
     TSGamePiece[] boardPieces = new TSGamePiece[maxPiecesOnBoard];
     for (int i = 0; i < boardPieces.Length; i++)
     {
         boardPieces[i] = Instantiate(piecePrefab);
         boardPieces[i].transform.SetParent(boardParent);
         boardPieces[i].transform.localScale = Vector3.one * 2;
         boardPieces[i].Init(index: i);
         boardPieces[i].ToggleVisible(startActive);
     }
     return(boardPieces);
 }
Beispiel #3
0
 public void ClearPiece()
 {
     activePiece.ToggleVisible(isVisibile: false);
     activePiece = null;
 }
Beispiel #4
0
 public void SetPiece(TSGamePiece piece)
 {
     activePiece = piece;
 }