private void Start() { FillBoardWithGems(); curTimer = levelDuration; if (lastGameWon) { curLevel++; } else { curLevel = 0; } curGoalScore = baseGoalScore + (curLevel * incGoalScore); ScorePanel.SetNewScore(curScore, false); }
private void AddMatchScore(List <List <Gem> > matchIslands) { int matchScore = comboBonusScore * comboCounter; foreach (List <Gem> island in matchIslands) { matchScore += baseMatchScore + bonusMatchScore * (island.Count - 3); } curScore += matchScore; ScorePanel.SetNewScore(curScore); if (curScore >= curGoalScore) { gameEnded = true; lastGameWon = true; onWon.Invoke(); } }