private async Task handleAddScoreDialog() { await this.addScoreContentDialog.ShowAsync(); if (this.addScoreContentDialog.IsPrimary) { var name = this.addScoreContentDialog.PlayerName; var score = new Score { Name = name, Value = this.playerManager.Score, Level = this.playerManager.Level }; this.scoreBoard.AddNewScore(score); this.scoreBoard.SaveNewScore(score); this.scoreBoard.ReadHighScore(); await this.highScoreContentDialog.ShowAsync(); } var isGameOver = new GameOverEventArg { GameOver = true }; this.soundManager.PlayGameOverSound(); this.GameOver?.Invoke(this, isGameOver); }
private async void setGameOverScreen() { var isGameOver = new GameOverEventArg { GameOver = true }; this.soundManager.PlayGameOverSound(); this.GameOver?.Invoke(this, isGameOver); await this.handleAddScoreDialog(); }