fix: prevent name conflict
This commit is contained in:
@@ -11,7 +11,7 @@ import AudioToolbox
|
||||
struct QuizView: View {
|
||||
|
||||
@StateObject var quizViewModel = QuizViewModel()
|
||||
@AppStorage("globalScore") var score: Int = 0
|
||||
@AppStorage("globalScore") var globalScore: Int = 0
|
||||
@Environment(\.dismiss) var dismiss
|
||||
|
||||
let questions: [QuizQuestion] // Neue Property
|
||||
@@ -29,7 +29,7 @@ struct QuizView: View {
|
||||
)
|
||||
.onAppear {
|
||||
AudioServicesPlaySystemSound(1322)
|
||||
score += quizViewModel.score
|
||||
globalScore += quizViewModel.score
|
||||
// Highscore prüfen/setzen
|
||||
quizViewModel.isNewHighscore = quizViewModel.updateHighscoreIfNeeded()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user