Compare commits
4 Commits
843f9d3a00
...
c3563e9902
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3563e9902 | ||
|
|
7e985fcf66 | ||
| f3dfb7aeea | |||
|
|
44c1314322 |
BIN
src/assets/Design/mini-icon-cave.png
Normal file
BIN
src/assets/Design/mini-icon-cave.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 370 B |
@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<title>codebeater</title>
|
||||
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/css/global.css">
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
|
||||
@ -212,3 +212,28 @@
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.floating-points {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
color: #ffdf12;
|
||||
font-size: 3rem;
|
||||
font-weight: bold;
|
||||
text-shadow: 2px 2px 0px #000;
|
||||
pointer-events: none;
|
||||
z-index: 999;
|
||||
animation: floatUp 1s ease-out forwards;
|
||||
}
|
||||
|
||||
@keyframes floatUp {
|
||||
0%{
|
||||
opacity: 1;
|
||||
transform: translate(-50%,-50%) scale(1);
|
||||
}
|
||||
100%{
|
||||
opacity: 0;
|
||||
transform: translate(-50%, -150%) scale(1.5)
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>firstperson</title>
|
||||
<title>codebeater</title>
|
||||
<link rel="stylesheet" href="/css/global.css">
|
||||
<link rel="stylesheet" href="/css/game.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Loading ...</title>
|
||||
<title>codebeater</title>
|
||||
<link rel="stylesheet" href="/css/global.css">
|
||||
<link rel="stylesheet" href="/css/game.css">
|
||||
</head>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>thirdperson</title>
|
||||
<title>codebeater</title>
|
||||
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/css/global.css">
|
||||
<link rel="stylesheet" href="/css/game.css">
|
||||
|
||||
@ -46,7 +46,8 @@ if (isset($_POST['login'])) {
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>login</title>
|
||||
<title>codebeater</title>
|
||||
<link rel="icon" type="image/png" href="/assets/Design/mini-icon-cave.png">
|
||||
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/css/global.css">
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
|
||||
@ -91,6 +91,9 @@ function selectAnswer(e){
|
||||
if(isCorrect){
|
||||
selectedBtn.classList.add("correct");
|
||||
score += 10;
|
||||
|
||||
showFloatingText();
|
||||
|
||||
shake(document.getElementById("boss"))
|
||||
dmg();
|
||||
const bgm = document.getElementById("sfx");
|
||||
@ -175,4 +178,17 @@ function postScore(score){
|
||||
alert("Terjadi kesalahan koneksi.");
|
||||
});
|
||||
}
|
||||
function showFloatingText(){
|
||||
const bossContainer = document.querySelector(".boss");
|
||||
const point = document.createElement("div");
|
||||
|
||||
point.textContent = "+10";
|
||||
point.classList.add("floating-points");
|
||||
|
||||
bossContainer.appendChild(point);
|
||||
|
||||
setTimeout(()=>{
|
||||
point.remove();
|
||||
}, 800);
|
||||
}
|
||||
startQuiz()
|
||||
@ -37,7 +37,7 @@ if($result){
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>leaderboard</title>
|
||||
<title>codebeater</title>
|
||||
<link rel="stylesheet" href="css/global.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
</head>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<title>codebeater</title>
|
||||
</head>
|
||||
<style>
|
||||
.notif {
|
||||
|
||||
@ -7,7 +7,7 @@ session_start();
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>onboard</title>
|
||||
<title>codebeater</title>
|
||||
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="css/global.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user