-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIntroductionView.swift
84 lines (73 loc) · 3.34 KB
/
IntroductionView.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import SwiftUI
struct IntroductionView: View {
// @EnvironmentObject var soundSettings: SoundSettings
var body: some View {
ZStack {
Color.white.edgesIgnoringSafeArea(.all)
VStack {
Spacer()
HStack(spacing: 15) {
Text("What is")
.font(.title)
.foregroundColor(.black)
Image("trusthires")
.resizable()
.scaledToFit()
.frame(width: 80, height: 90)
Text("?")
.font(.title)
.foregroundColor(.black)
}
.padding()
Text("Trust is a fundamental aspect of human relationships and societal structures, evolving significantly from the era of hunter-gatherers to the complex societies we live in today. It's a mechanism for reducing complexity in social interactions, allowing individuals and groups to collaborate, share resources, and build communities. However, the decision to trust is fraught with complexity and risk, particularly in competitive or uncertain environments.")
.padding()
.foregroundColor(.black)
.font(.system(size: 18))
NavigationLink(destination: RulesView().background(Color.white)) {
Image(systemName: "arrow.right.circle.fill")
.resizable()
.scaledToFit()
.frame(width: 60, height: 60)
.foregroundColor(.blue)
.padding()
} .onAppear{
SoundManager.shared.playBackgroundMusic(name: "backgroundmusic")
}
Spacer()
}
VStack {
HStack {
Spacer()
// Button(action: {
// soundSettings.isSoundEnabled.toggle()
//
// if soundSettings.isSoundEnabled {
// SoundManager.shared.playBackgroundMusic(name: "backgroundmusic")
// } else {
// SoundManager.shared.stopBackgroundMusic()
// }
// }
// ) {
// Image(systemName: soundSettings.isSoundEnabled ? "speaker.wave.3.fill" : "speaker.slash.fill")
// .resizable()
// .scaledToFit()
// .frame(width: 25, height: 25)
// .foregroundColor(.white)
// .padding()
// .background(Color.blue)
// .clipShape(Circle())
// }
// .padding([.top, .trailing], 20)
}
Spacer()
}
}
.navigationBarTitle("Introduction", displayMode: .inline)
}
}
struct IntroductionView_Previews: PreviewProvider {
static var previews: some View {
IntroductionView()
//.environmentObject(SoundSettings())
}
}