cutechicken commited on
Commit
f043b41
โ€ข
1 Parent(s): 7d05cf8

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +5 -15
index.html CHANGED
@@ -338,7 +338,7 @@
338
 
339
  <div class="start-screen" id="startScreen">
340
  <h1 style="color: #0f0; font-size: 48px; margin-bottom: 20px;">Tank Combat Simulator</h1>
341
- <button class="start-button" id="startButton" disabled>Loading...</button>
342
  <div style="color: #0f0; margin-top: 20px; text-align: center;">
343
  <p>Controls:</p>
344
  <p>W,A,S,D - Move Tank</p>
@@ -385,22 +385,12 @@
385
  }
386
  </script>
387
  <script>
388
- // ๊ฒŒ์ž„ ๋กœ๋”ฉ ์™„๋ฃŒ ์‹œ ํ˜ธ์ถœ๋  ํ•จ์ˆ˜
389
- function onGameLoaded() {
390
- const startButton = document.getElementById('startButton');
391
- startButton.textContent = 'Start Game';
392
- startButton.classList.add('ready');
393
- startButton.disabled = false;
394
- }
395
-
396
- // startGame ํ•จ์ˆ˜ ์ˆ˜์ •
397
  function startGame() {
398
- if (document.getElementById('startButton').classList.contains('ready')) {
399
- document.getElementById('startScreen').style.display = 'none';
400
- document.body.requestPointerLock();
401
- window.gameInstance.isStarted = true;
402
- }
403
  }
 
404
  // ํฌ์ธํ„ฐ ๋ฝ ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ
405
  document.addEventListener('pointerlockchange', () => {
406
  if (document.pointerLockElement === document.body) {
 
338
 
339
  <div class="start-screen" id="startScreen">
340
  <h1 style="color: #0f0; font-size: 48px; margin-bottom: 20px;">Tank Combat Simulator</h1>
341
+ <button class="start-button" onclick="startGame()">Start Game</button>
342
  <div style="color: #0f0; margin-top: 20px; text-align: center;">
343
  <p>Controls:</p>
344
  <p>W,A,S,D - Move Tank</p>
 
385
  }
386
  </script>
387
  <script>
 
 
 
 
 
 
 
 
 
388
  function startGame() {
389
+ document.getElementById('startScreen').style.display = 'none';
390
+ // ์—ฌ๊ธฐ์— ๊ฒŒ์ž„ ์‹œ์ž‘ ๋กœ์ง ์ถ”๊ฐ€
391
+ document.body.requestPointerLock();
 
 
392
  }
393
+
394
  // ํฌ์ธํ„ฐ ๋ฝ ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ
395
  document.addEventListener('pointerlockchange', () => {
396
  if (document.pointerLockElement === document.body) {