예제 #1
0
    public const int EPHEMERAL_HOLD_THRESHOLD = 4; //The number of times that hold must go unused while under the Ephemereal Hold curse to trigger removing the hold piece.

    // Start is called before the first frame update
    void Start()
    {
        PopulatePieceData();
        //Set up PieceCells for display.
        for (int i = 0; i < 20; i++)
        {
            GameObject newCell = Instantiate(cellPrefab, transform); //transform argument sets self as parent
            PieceCell  cellref = newCell.GetComponent <PieceCell>();
            cellref.minoNum = i;
        }
        ResetObject();
    }
예제 #2
0
    // Start is called before the first frame update
    void Start()
    {
        PopulatePieceData();
        //Set up PieceCells for display.
        for (int i = 0; i < 20; i++)
        {
            GameObject newCell = Instantiate(cellPrefab, transform); //transform argument sets self as parent
            PieceCell  cellref = newCell.GetComponent <PieceCell>();
            cellref.minoNum = i;
        }
        //Permanently set display texture to the incoming mino texture.
        texture = INCOMING_MINO_TEXTURE_ID;
        //Permanently set position to the spawn location.
        int posX = (ref_Orchestrator.ref_Board.width - 1) / 2;
        int posY = ref_Orchestrator.ref_Board.height + 1;

        transform.localPosition = new Vector3((posX * MINO_SIZE) + (MINO_SIZE / 2), (posY * MINO_SIZE) + (MINO_SIZE / 2), PIECE_Z - 1); //Hacky looking coordinates are needed to align the piece to the grid. //Piece Z has minus 1 so it appears on top of the active piece
    }
예제 #3
0
 public Piece(PieceCell[] pieceCells, int number)
 {
     _pieceCells = pieceCells;
     Number = number;
 }