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(); }
// 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 }
public Piece(PieceCell[] pieceCells, int number) { _pieceCells = pieceCells; Number = number; }