comparison GeoQuiz/Logic/HapticsClass.swift @ 14:136928bae534

add user profile
author Dennis C. M. <dennis@denniscm.com>
date Wed, 19 Oct 2022 07:56:33 +0200
parents a793f33f05fb
children
comparison
equal deleted inserted replaced
13:bdfff35dd43c 14:136928bae534
10 10
11 class Haptics { 11 class Haptics {
12 private var user = User() 12 private var user = User()
13 13
14 func success() { 14 func success() {
15 if user.settings.haptics { 15 if user.data.haptics {
16 let generator = UINotificationFeedbackGenerator() 16 let generator = UINotificationFeedbackGenerator()
17 generator.notificationOccurred(.success) 17 generator.notificationOccurred(.success)
18 } 18 }
19 } 19 }
20 20
21 func error() { 21 func error() {
22 if user.settings.haptics { 22 if user.data.haptics {
23 let generator = UINotificationFeedbackGenerator() 23 let generator = UINotificationFeedbackGenerator()
24 generator.notificationOccurred(.error) 24 generator.notificationOccurred(.error)
25 } 25 }
26 } 26 }
27 } 27 }