private void Start() { // Sync all the values that use there value here initially. OnHitpointChangeEvent?.Invoke(hitPoints); OnFundsChangeEvent?.Invoke(funds); OnScoreChangeEvent?.Invoke(score); }
public void RemoveFullRow(int row) { for (int x = 0; x < Width; x++) { if (IsEmpty(new Point(x, row))) { return; } if (x == Width - 1) { // Go through each column for (int col = 0; col < Width; col++) { // move each cell one down above the emptied row for (int y = row; y > 0; y--) { SetCellAppearance(col, y, GetCellAppearance(col, y - 1)); } } } } Score++; OnScoreChangeEvent?.Invoke(Score); RemoveFullRow(row); }