awacke1 commited on
Commit
7669be7
·
verified ·
1 Parent(s): cffb761

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +6 -40
index.html CHANGED
@@ -161,31 +161,22 @@
161
  .item-text { color: #6af; font-style: italic; font-size: 0.9em; margin-bottom: 1em; border-left: 3px solid #369; padding-left: 8px; background-color: rgba(0, 100, 200, 0.1); padding: 5px;}
162
  .stat-increase-text { color: #9f9; font-style: italic; font-size: 0.9em; margin-bottom: 1em; border-left: 3px solid #4a4; padding-left: 8px; background-color: rgba(0, 200, 0, 0.1); padding: 5px;}
163
 
164
- #start-game-container {
165
- padding: 30px 0;
166
- text-align: center;
167
- }
168
-
169
-
170
  </style>
171
  </head>
172
  <body>
173
  <div id="game-container">
174
  <div id="scene-container"></div>
175
  <div id="ui-container">
176
- <h2 id="story-title">Welcome, Adventurer</h2>
177
  <div id="story-content">
178
- <p>The world awaits your decisions.</p>
179
- <div id="start-game-container">
180
- <button id="start-button" class="choice-button" style="width: 80%; margin: 20px auto; text-align: center; padding: 15px;">Begin Your Adventure</button>
181
- </div>
182
  </div>
183
- <div id="stats-inventory-container" style="display: none;">
184
  <div id="stats-display"></div>
185
  <div id="effects-display"></div>
186
  <div id="inventory-display"></div>
187
  </div>
188
- <div id="choices-container" style="display: none;">
189
  <h3>What will you do?</h3>
190
  <div id="choices"></div>
191
  </div>
@@ -211,11 +202,9 @@
211
  const statsElement = document.getElementById('stats-display');
212
  const effectsElement = document.getElementById('effects-display');
213
  const inventoryElement = document.getElementById('inventory-display');
214
- const startGameContainer = document.getElementById('start-game-container');
215
  const statsInventoryContainer = document.getElementById('stats-inventory-container');
216
  const choicesContainer = document.getElementById('choices-container');
217
 
218
-
219
  let scene, camera, renderer, clock;
220
  let currentAssemblyGroup = null;
221
  let currentLights = [];
@@ -1737,29 +1726,6 @@
1737
 
1738
  }
1739
 
1740
- function setupStartButton() {
1741
- const startButton = document.getElementById('start-button');
1742
-
1743
- if (startButton && startGameContainer) {
1744
- statsInventoryContainer.style.display = 'none';
1745
- choicesContainer.style.display = 'none';
1746
- storyTitleElement.textContent = "Welcome";
1747
- storyContentElement.innerHTML = "<p>Click 'Begin Your Adventure' to start.</p>" + startGameContainer.innerHTML;
1748
- startGameContainer.style.display = 'block';
1749
-
1750
- startButton.onclick = () => {
1751
- console.log("Start button clicked.");
1752
- startGameContainer.style.display = 'none';
1753
- statsInventoryContainer.style.display = 'block';
1754
- choicesContainer.style.display = 'block';
1755
- startGame();
1756
- };
1757
- } else {
1758
- console.error("Start button or container not found!");
1759
- storyContentElement.innerHTML = "<p style='color:red;'>Error: Could not set up start button.</p>";
1760
- }
1761
- }
1762
-
1763
 
1764
  document.addEventListener('DOMContentLoaded', () => {
1765
  console.log("DOM Ready - Initializing Enhanced Adventure.");
@@ -1768,8 +1734,8 @@
1768
  if (!scene || !camera || !renderer) {
1769
  throw new Error("Three.js core component initialization failed.");
1770
  }
1771
- setupStartButton();
1772
- console.log("Initialization complete. Ready to start.");
1773
  } catch (error) {
1774
  console.error("Initialization failed:", error);
1775
  storyTitleElement.textContent = "Error During Initialization";
 
161
  .item-text { color: #6af; font-style: italic; font-size: 0.9em; margin-bottom: 1em; border-left: 3px solid #369; padding-left: 8px; background-color: rgba(0, 100, 200, 0.1); padding: 5px;}
162
  .stat-increase-text { color: #9f9; font-style: italic; font-size: 0.9em; margin-bottom: 1em; border-left: 3px solid #4a4; padding-left: 8px; background-color: rgba(0, 200, 0, 0.1); padding: 5px;}
163
 
 
 
 
 
 
 
164
  </style>
165
  </head>
166
  <body>
167
  <div id="game-container">
168
  <div id="scene-container"></div>
169
  <div id="ui-container">
170
+ <h2 id="story-title">Loading Adventure...</h2>
171
  <div id="story-content">
172
+ <p>Please wait while the adventure loads.</p>
 
 
 
173
  </div>
174
+ <div id="stats-inventory-container">
175
  <div id="stats-display"></div>
176
  <div id="effects-display"></div>
177
  <div id="inventory-display"></div>
178
  </div>
179
+ <div id="choices-container">
180
  <h3>What will you do?</h3>
181
  <div id="choices"></div>
182
  </div>
 
202
  const statsElement = document.getElementById('stats-display');
203
  const effectsElement = document.getElementById('effects-display');
204
  const inventoryElement = document.getElementById('inventory-display');
 
205
  const statsInventoryContainer = document.getElementById('stats-inventory-container');
206
  const choicesContainer = document.getElementById('choices-container');
207
 
 
208
  let scene, camera, renderer, clock;
209
  let currentAssemblyGroup = null;
210
  let currentLights = [];
 
1726
 
1727
  }
1728
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1729
 
1730
  document.addEventListener('DOMContentLoaded', () => {
1731
  console.log("DOM Ready - Initializing Enhanced Adventure.");
 
1734
  if (!scene || !camera || !renderer) {
1735
  throw new Error("Three.js core component initialization failed.");
1736
  }
1737
+ startGame();
1738
+ console.log("Game started automatically.");
1739
  } catch (error) {
1740
  console.error("Initialization failed:", error);
1741
  storyTitleElement.textContent = "Error During Initialization";