feat: add alex
This commit is contained in:
@@ -15,18 +15,18 @@
|
|||||||
<!-- 游戏的界面元素 -->
|
<!-- 游戏的界面元素 -->
|
||||||
<div id="restaurant">
|
<div id="restaurant">
|
||||||
<div id="desktop">
|
<div id="desktop">
|
||||||
<img src="asset/pic/louis16/LouisXVI_RestaurantTable.png" alt="desktop">
|
<img src="asset/pic/alexander/desk.png" alt="desktop">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- empires elements-->
|
<!-- empires elements-->
|
||||||
<div id="louis" class="empire">
|
<div id="alex" class="empire">
|
||||||
<img src="asset/pic/louis16/LouisXVI_Normal.png" alt="louis16">
|
<img src="asset/pic/alexander/alexander.png" alt="alex">
|
||||||
</div>
|
</div>
|
||||||
<div id="louis1" class="empire">
|
<div id="alex1" class="empire">
|
||||||
<img src="asset/pic/louis16/LouisXVI_Dying.png" alt="砍头台">
|
<img src="asset/pic/alexander/alexander.png" alt="alex">
|
||||||
</div>
|
</div>
|
||||||
<div id="louis2" class="empire">
|
<div id="alex2" class="empire">
|
||||||
<img src="asset/pic/louis16/LouisXVI_Dead.png" alt="死">
|
<img src="asset/pic/alexander/typhoid_fever.png" alt="死">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- customers elements -->
|
<!-- customers elements -->
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
body {
|
body {
|
||||||
background-image: url('../asset/pic/louis16/LouisXVI_Restaurant.png');
|
background-image: url('../asset/pic/alexander/background.png');
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-color: rgb(0, 136, 109);
|
background-color: rgb(0, 136, 109);
|
||||||
}
|
}
|
||||||
@@ -36,17 +36,17 @@
|
|||||||
z-index: 4;
|
z-index: 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
#louis img{ /* louis 16 */
|
#alex img{ /* louis 16 */
|
||||||
top: 235px;
|
top: 235px;
|
||||||
left: 1050px;
|
left: 1050px;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#louis1 img{ /* 断头台 */
|
#alex1 img{ /* 断头台 */
|
||||||
top: 235px;
|
top: 235px;
|
||||||
left: 1050px;
|
left: 1050px;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#louis2 img{ /* 死 */
|
#alex2 img{ /* 死 */
|
||||||
top: 235px;
|
top: 235px;
|
||||||
left: 1050px;
|
left: 1050px;
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ const customers = [
|
|||||||
|
|
||||||
const RandomCustomerIndex = Math.floor(Math.random() * customers.length);
|
const RandomCustomerIndex = Math.floor(Math.random() * customers.length);
|
||||||
|
|
||||||
const louises = [
|
const alexes = [
|
||||||
'#louis img',
|
'#alex img',
|
||||||
'#louis1 img',
|
'#alex1 img',
|
||||||
'#louis2 img'
|
'#alex2 img'
|
||||||
]
|
]
|
||||||
|
|
||||||
function checkAnswer(dishName){
|
function checkAnswer(dishName){
|
||||||
@@ -53,7 +53,7 @@ function handleClick(dishName) {
|
|||||||
console.log("恭喜,你选对了!");
|
console.log("恭喜,你选对了!");
|
||||||
if (currentIndex == 9){
|
if (currentIndex == 9){
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
window.location.href = 'louiswin.html';
|
window.location.href = 'alexwin.html';
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
@@ -97,7 +97,7 @@ function handleClick(dishName) {
|
|||||||
showElement(louises[2])
|
showElement(louises[2])
|
||||||
// Delay for 2 seconds before redirecting
|
// Delay for 2 seconds before redirecting
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
window.location.href = 'louislose.html';
|
window.location.href = 'alexlose.html';
|
||||||
}, 2000);
|
}, 2000);
|
||||||
// 这里可以添加结束游戏或其他逻辑
|
// 这里可以添加结束游戏或其他逻辑
|
||||||
break;
|
break;
|
||||||
@@ -169,7 +169,7 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||||||
showElement(customers[RandomCustomerIndex][0]);
|
showElement(customers[RandomCustomerIndex][0]);
|
||||||
|
|
||||||
// Show normal louis
|
// Show normal louis
|
||||||
showElement('#louis img');
|
showElement('#alex img');
|
||||||
|
|
||||||
// Show hint bottom
|
// Show hint bottom
|
||||||
showElement('#hint img')
|
showElement('#hint img')
|
||||||
|
|||||||
Reference in New Issue
Block a user