teks shadow
This commit is contained in:
parent
9c4dc721a2
commit
258ca6bf43
@ -128,15 +128,17 @@
|
|||||||
.text {
|
.text {
|
||||||
padding-top: 30px;
|
padding-top: 30px;
|
||||||
padding-left: 50px;
|
padding-left: 50px;
|
||||||
color: rgb(0, 0, 0);
|
color: rgb(255, 255, 255);
|
||||||
font-weight: 90px;
|
font-weight: 90px;
|
||||||
|
text-shadow: black 3px 4px 1px;
|
||||||
}
|
}
|
||||||
.text-spd {
|
.text-spd {
|
||||||
padding-bottom: 0px;
|
padding-bottom: 0px;
|
||||||
padding-left: 50px;
|
padding-left: 50px;
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
color: rgb(0, 0, 0);
|
color: rgb(255, 255, 255);
|
||||||
font-weight: 1000;
|
font-weight: 1000;
|
||||||
|
text-shadow: black 3px 4px 1px;
|
||||||
}
|
}
|
||||||
#gameover {
|
#gameover {
|
||||||
color: red;
|
color: red;
|
||||||
|
|||||||
117
game.html
117
game.html
@ -1,67 +1,74 @@
|
|||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<!-- tes merge -->
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" href="GameStyle.css" />
|
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
||||||
<link
|
|
||||||
href="https://fonts.googleapis.com/css2?family=Coral+Pixels&family=Jacquarda+Bastarda+9&family=Pixelify+Sans:wght@400..700&display=swap"
|
|
||||||
rel="stylesheet"
|
|
||||||
/>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<!-- header -->
|
|
||||||
<header>
|
|
||||||
<div class="centered">
|
|
||||||
<div class="icon"></div>
|
|
||||||
<h1>Snake</h1>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
<img src="" alt="">
|
|
||||||
<!-- main konten -->
|
|
||||||
<div class="HalamanFull">
|
|
||||||
<div class="text-spd">UP & DOWN SPD: E Q<br /><br /></div>
|
|
||||||
<!-- Kontainer baru untuk game dan overlay-nya -->
|
|
||||||
<div class="game-container">
|
|
||||||
<canvas width="1056" height="480" id="game"></canvas>
|
|
||||||
|
|
||||||
<div id="gameover-overlay" class="starting" style="display: none">
|
<head>
|
||||||
<div class="popAwal1">
|
<link rel="stylesheet" href="GameStyle.css" />
|
||||||
<h1 style="color: red" id="gameover-title">YOU DIED</h1>
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
<p id="gameover-score">Score: 0</p>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||||
<button id="ulangi" class="modegame">Main lagi?</button>
|
<link
|
||||||
<a href="http://localhost/uas_sem_1/index.php">
|
href="https://fonts.googleapis.com/css2?family=Coral+Pixels&family=Jacquarda+Bastarda+9&family=Pixelify+Sans:wght@400..700&display=swap"
|
||||||
<button id="keluar" class="">Keluar?</button>
|
rel="stylesheet" />
|
||||||
</a>
|
</head>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="gameover" class="gameover"></div>
|
<body>
|
||||||
|
<!-- header -->
|
||||||
|
<header>
|
||||||
|
<div class="centered">
|
||||||
|
<div class="icon"></div>
|
||||||
|
<h1>Snake</h1>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<img src="" alt="">
|
||||||
|
<!-- main konten -->
|
||||||
|
<div class="HalamanFull">
|
||||||
|
<div class="text-spd">UP & DOWN SPD: E Q<br /><br /></div>
|
||||||
|
<!-- Kontainer baru untuk game dan overlay-nya -->
|
||||||
|
<div class="game-container">
|
||||||
|
<canvas width="1056" height="480" id="game"></canvas>
|
||||||
|
|
||||||
|
<div id="gameover-overlay" class="starting" style="display: none">
|
||||||
|
<div class="popAwal1">
|
||||||
|
|
||||||
|
<h1 style="color: red" id="gameover-title">YOU DIED</h1>
|
||||||
|
|
||||||
|
<p id="gameover-score">Score: 0</p>
|
||||||
|
|
||||||
|
<button id="ulangi" class="modegame">Main lagi?</button>
|
||||||
|
|
||||||
|
<a href="http://localhost/uas_sem_1/index.php">
|
||||||
|
<button id="keluar" class="out">Keluar?</button>
|
||||||
|
</a>
|
||||||
|
|
||||||
<div id="start" class="starting">
|
|
||||||
<div class="popAwal">
|
|
||||||
<h1>Start Game?</h1>
|
|
||||||
<p>Silakan Pilih Mode</p>
|
|
||||||
<button id="mode-normal" class="modegame">Normal</button>
|
|
||||||
<button id="mode-tambahan" class="modegame">Normal++</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div id="gameover" class="gameover"></div>
|
||||||
<div id="text" class="text"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<div id="start" class="starting">
|
||||||
|
<div class="popAwal">
|
||||||
|
<h1>Start Game?</h1>
|
||||||
|
<p>Silakan Pilih Mode</p>
|
||||||
|
<button id="mode-normal" class="modegame">Normal</button>
|
||||||
|
<button id="mode-tambahan" class="modegame">Normal++</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- footer -->
|
<div>
|
||||||
<footer class="centered">
|
<div id="text" class="text"></div>
|
||||||
<div class="centered">
|
</div>
|
||||||
<p></p>
|
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
|
||||||
<!-- akhir html body -->
|
<!-- footer -->
|
||||||
<script src="GameLogic.js"></script>
|
<footer class="centered">
|
||||||
</body>
|
<div class="centered">
|
||||||
|
<p></p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
<!-- akhir html body -->
|
||||||
|
<script src="GameLogic.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
86
game.php
86
game.php
@ -3,44 +3,56 @@ session_start();
|
|||||||
|
|
||||||
// Cek apakah user sudah login
|
// Cek apakah user sudah login
|
||||||
if (!isset($_SESSION['users'])) {
|
if (!isset($_SESSION['users'])) {
|
||||||
header("Location: login.php");
|
header("Location: login.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" href="GameStyle.css" />
|
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
||||||
<link
|
|
||||||
href="https://fonts.googleapis.com/css2?family=Coral+Pixels&family=Jacquarda+Bastarda+9&family=Pixelify+Sans:wght@400..700&display=swap"
|
|
||||||
rel="stylesheet"
|
|
||||||
/>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<!-- header -->
|
|
||||||
<header>
|
|
||||||
<div class="centered">
|
|
||||||
<div class="icon"></div>
|
|
||||||
<h1>Snake - <?php echo htmlspecialchars($_SESSION['users']['nama']); ?></h1>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<!-- main konten -->
|
<head>
|
||||||
<div class="HalamanFull">
|
<link rel="stylesheet" href="GameStyle.css" />
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||||
|
<link
|
||||||
|
href="https://fonts.googleapis.com/css2?family=Coral+Pixels&family=Jacquarda+Bastarda+9&family=Pixelify+Sans:wght@400..700&display=swap"
|
||||||
|
rel="stylesheet" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<!-- header -->
|
||||||
|
<header>
|
||||||
|
<div class="centered">
|
||||||
|
<div class="icon"></div>
|
||||||
|
<h1>Snake</h1>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<img src="" alt="">
|
||||||
|
<!-- main konten -->
|
||||||
|
<div class="HalamanFull">
|
||||||
|
<div class="text-spd">UP & DOWN SPD: E Q<br /><br /></div>
|
||||||
|
<!-- Kontainer baru untuk game dan overlay-nya -->
|
||||||
|
<div class="game-container">
|
||||||
<canvas width="1056" height="480" id="game"></canvas>
|
<canvas width="1056" height="480" id="game"></canvas>
|
||||||
|
|
||||||
<div id="gameover-overlay" class="starting" style="display: none">
|
<div id="gameover-overlay" class="starting" style="display: none">
|
||||||
<div class="popAwal">
|
<div class="popAwal1">
|
||||||
|
|
||||||
<h1 style="color: red" id="gameover-title">YOU DIED</h1>
|
<h1 style="color: red" id="gameover-title">YOU DIED</h1>
|
||||||
|
|
||||||
<p id="gameover-score">Score: 0</p>
|
<p id="gameover-score">Score: 0</p>
|
||||||
|
|
||||||
<button id="ulangi" class="modegame">Main lagi?</button>
|
<button id="ulangi" class="modegame">Main lagi?</button>
|
||||||
<a href="index.php">
|
|
||||||
|
<a href="http://localhost/uas_sem_1/index.php">
|
||||||
<button id="keluar" class="">Keluar?</button>
|
<button id="keluar" class="">Keluar?</button>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="gameover" class="gameover"></div>
|
<div id="gameover" class="gameover"></div>
|
||||||
|
|
||||||
<div id="start" class="starting">
|
<div id="start" class="starting">
|
||||||
<div class="popAwal">
|
<div class="popAwal">
|
||||||
<h1>Start Game?</h1>
|
<h1>Start Game?</h1>
|
||||||
@ -49,18 +61,22 @@ if (!isset($_SESSION['users'])) {
|
|||||||
<button id="mode-tambahan" class="modegame">Normal++</button>
|
<button id="mode-tambahan" class="modegame">Normal++</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<div id="text" class="text"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- footer -->
|
<div>
|
||||||
<footer class="centered">
|
<div id="text" class="text"></div>
|
||||||
<div class="centered">
|
</div>
|
||||||
<p></p>
|
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
|
||||||
<!-- akhir html body -->
|
<!-- footer -->
|
||||||
<script src="GameLogic.js"></script>
|
<footer class="centered">
|
||||||
</body>
|
<div class="centered">
|
||||||
|
<p></p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
<!-- akhir html body -->
|
||||||
|
<script src="GameLogic.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Loading…
x
Reference in New Issue
Block a user