-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
30 lines (26 loc) · 1.08 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SecureFlame Game</title>
<link rel="stylesheet" href="style.css"> <!-- Ensure your CSS is linked here -->
<!-- Load the Phaser library -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/phaser.js"></script> <!-- Correct Phaser CDN -->
</head>
<body>
<div id="gameContainer"></div>
<!-- Start button -->
<button id="startGameBtn" onclick="startGame()">Start Game</button>
<!-- Main game script -->
<script type="module" src="main.js"></script> <!-- Ensure this points to your main script -->
<script>
// Function to hide start button after game starts
function startGame() {
document.getElementById('startGameBtn').style.display = 'none'; // Hide start button
// Now start your Phaser game
const game = new Phaser.Game(config); // Assuming your main.js config object is correct
}
</script>
</body>
</html>