forked from rogeraabbccdd/AsiaGodTone-Hotpot-Game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
184 lines (180 loc) · 9.33 KB
/
index.html
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<!DOCTYPE html>
<html lang="zh-Hant-TW">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-WKZ4GFL55N"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-WKZ4GFL55N');
</script>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="./css/app.css">
<!-- Primary Meta Tags -->
<title>統神端火鍋</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<meta name="title" content="統神端火鍋">
<meta name="description" content="統神端火鍋小遊戲,你能讓統神走多遠不跌倒?">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://rogeraabbccdd.github.io/AsiaGodTone-Hotpot-Game">
<meta property="og:title" content="統神端火鍋">
<meta property="og:description" content="統神端火鍋小遊戲,你能讓統神走多遠不跌倒?">
<meta property="og:image" content="https://rogeraabbccdd.github.io/AsiaGodTone-Hotpot-Game/assets/preview.jpg">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://rogeraabbccdd.github.io/AsiaGodTone-Hotpot-Game">
<meta property="twitter:title" content="統神端火鍋">
<meta property="twitter:description" content="統神端火鍋小遊戲,你能讓統神走多遠不跌倒?">
<meta property="twitter:image" content="https://rogeraabbccdd.github.io/AsiaGodTone-Hotpot-Game/assets/preview.jpg">
</head>
<body>
<div id="app">
<div id="bg" :style="{backgroundImage: roadimg}"></div>
<div class="container w-100 h-100" id="game">
<div class="row mx-auto w-100 h-100 content" ref="gamediv">
<div class="col-12 mx-auto align-self-top"id="score">
<h1 class="text-white">{{ scoreText }}m</h1>
</div>
<div class="col-12 mx-auto align-self-center" id="hotpot" :style="{transform: `rotateZ(${angle}deg)`}">
<img id="hotpot-img" :src="gameimg">
</div>
<div class="col-12 mx-auto align-self-end" id="control">
<h1 class="text-white text-center">{{ Math.round((userinput-5)*10)/10 }}</h1>
<input type="range" class="form-range" v-model="userinput" min="0" max="10" step="0.1" :disabled="game !== 1" v-if="control === 0">
</div>
</div>
<div class="mx-auto" id="title" v-if="game === 0">
<div class="row align-contents-center content mx-auto align-content-center">
<div class="col-12 text-white text-center">
<h1 class="display-1">統神端火鍋</h1>
<h3>
讓統神維持平衡
<br>
<span class="text-danger">
<span v-if="difficulty === 0">左右傾斜超過 50 度就會跌倒</span>
<span v-else-if="difficulty === 1">左右傾斜超過 60 度就會跌倒</span>
<span v-else-if="difficulty === 2">轉 3 圈就會跌倒</span>
</span>
</h3>
<div class="row justify-content-between">
<div class="col-4">
<button type="button" class="btn btn-primary w-100" value="橫桿" @click="control = 0" :class="{'border border-3': control === 0}">
<span class="material-icons">linear_scale</span>
<br>
橫桿
</button>
</div>
<div class="col-4">
<button type="button" class="btn btn-primary w-100" value="螢幕" @click="control = 1" :class="{'border border-3': control === 1}">
<span class="material-icons">mouse</span>
<br>
點按螢幕
</button>
</div>
<div class="col-4">
<button type="button" class="btn btn-primary w-100" value="陀螺儀" @click="control = 2" :class="{'border border-3': control === 2}">
<span class="material-icons">screen_rotation</span>
<br>
陀螺儀
</button>
</div>
<div class="col-12 mt-3">
<p v-if="control === 0">
調整螢幕下方的橫桿
</p>
<p v-if="control === 1">
點擊螢幕或滑動滑鼠、手指
</p>
<p v-if="control === 2">
左右傾斜裝置
</p>
</div>
<div class="col-12">
<input type="button" value="超級簡單" class="btn btn-success" @click="difficulty = 2" :class="{'border border-3': difficulty === 2, 'mx-2': true}">
<input type="button" value="簡單" class="btn btn-primary" @click="difficulty = 1" :class="{'border border-3': difficulty === 1, 'mx-2': true}">
<input type="button" value="困難" class="btn btn-danger" @click="difficulty = 0" :class="{'border border-3': difficulty === 0, 'mx-2': true}">
</div>
</div>
<br>
<input type="button" value="開始遊戲" class="btn btn-success" @click="restart(false)">
</div>
</div>
</div>
<div class="mx-auto" id="gameover" v-if="game === 2">
<div class="row align-contents-center content mx-auto align-content-center">
<div class="col-12 text-white text-center">
<h1 class="display-1">遊戲結束</h1>
<h1>距離: {{ scoreText }} 公尺</h1>
<div class="row justify-content-between">
<div class="col-4">
<button type="button" class="btn btn-primary w-100" value="橫桿" @click="control = 0" :class="{'border border-3': control === 0}">
<span class="material-icons">linear_scale</span>
<br>
橫桿
</button>
</div>
<div class="col-4">
<button type="button" class="btn btn-primary w-100" value="螢幕" @click="control = 1" :class="{'border border-3': control === 1}">
<span class="material-icons">mouse</span>
<br>
點按螢幕
</button>
</div>
<div class="col-4">
<button type="button" class="btn btn-primary w-100" value="陀螺儀" @click="control = 2" :class="{'border border-3': control === 2}">
<span class="material-icons">screen_rotation</span>
<br>
陀螺儀
</button>
</div>
<div class="col-12 mt-3">
<p v-if="control === 0">
調整螢幕下方的橫桿
</p>
<p v-if="control === 1">
點擊螢幕或滑動滑鼠、手指
</p>
<p v-if="control === 2">
左右傾斜裝置
</p>
</div>
<div class="col-12">
<input type="button" value="超級簡單" class="btn btn-success" @click="difficulty = 2" :class="{'border border-3': difficulty === 2, 'mx-2': true}">
<input type="button" value="簡單" class="btn btn-primary" @click="difficulty = 1" :class="{'border border-3': difficulty === 1, 'mx-2': true}">
<input type="button" value="困難" class="btn btn-danger" @click="difficulty = 0" :class="{'border border-3': difficulty === 0, 'mx-2': true}">
</div>
</div>
<br>
<input type="button" value="再玩一次" class="btn btn-success" @click="restart(true)">
<br>
<br>
<p>
© {{ dateYear }}
Made with ❤ by
<a target="_blank" href="https://github.com/rogeraabbccdd" class="text-white">Kento</a>
</p>
<br>
<a target="_blank" href="https://github.com/rogeraabbccdd/AsiaGodTone-Hotpot-Game/fork">
<img class="mx-1" src="https://img.shields.io/github/forks/rogeraabbccdd/AsiaGodTone-Hotpot-Game?style=social">
</a>
<a target="_blank" href="https://github.com/rogeraabbccdd/AsiaGodTone-Hotpot-Game/stargazers">
<img class="mx-1" src="https://img.shields.io/github/stars/rogeraabbccdd/AsiaGodTone-Hotpot-Game?style=social">
</a>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.bundle.min.js" integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0" crossorigin="anonymous"></script>
<script src="https://unpkg.com/vue@next"></script>
<script src="https://unpkg.com/@vueuse/shared"></script>
<script src="https://unpkg.com/@vueuse/core"></script>
<script src="./js/app.js"></script>
</body>
</html>