public void ShapeReachedTower() { int numberOfPlanesFilled = tower.AddShapeToTower(currentShape); int newLastFullPlane = tower.LastFullPlane; int heightDifference = tower.Height - lastHeight; lastHeight = tower.Height; cubeVisualizer.ResetSpeed(); if (newLastFullPlane != currentFullPlane) { PlaneGotFilled(numberOfPlanesFilled); currentFullPlane = newLastFullPlane; graphicsManager.PlayPlaneFilledEffect(currentFullPlane); ScoreManager.incrementScore(heightDifference, numberOfPlanesFilled); soundManager.PlayPlaneFilledAudio(); } else { soundManager.PlayShapeReacheAdui(); ScoreManager.incrementScore(heightDifference, 0); } uiHandler.SetScoreDisplay(ScoreManager.Score); if (tower.Height > spawnHeight - gameOverOffset) { GameOver(); return; } else if (tower.Height > spawnHeight - gameOverOffset - alertOffset) { cubeVisualizer.DisplayGameOverAlert(); } else { cubeVisualizer.RemoveGameOverAlert(); } cubeVisualizer.TransferShapeVisualsIntoTower(); SpawnShape(); }