KBLLR commited on
Commit
be6c121
·
verified ·
1 Parent(s): 25b1291

there seems to be an error on the Select 5 unique characters to populate your world. screen, the button doesnt appear. Also, we can reduce it to 2 characters instead of 5

Browse files
Files changed (1) hide show
  1. index.html +18 -20
index.html CHANGED
@@ -162,13 +162,13 @@
162
  <div class="container mx-auto px-6 py-8 h-full flex flex-col relative z-10">
163
  <div class="text-center mb-12">
164
  <h2 class="text-5xl font-black mb-4 gradient-text">Forge Your Universe</h2>
165
- <p class="text-xl text-gray-300 max-w-2xl mx-auto">Select 5 unique characters to populate your world. Each will bring their own stories and interactions to your adventure.</p>
166
  <div class="mt-4 inline-flex items-center space-x-4 bg-white/5 rounded-full px-6 py-3 border border-white/10">
167
  <span class="text-green-400 font-semibold" id="selected-count">0</span>
168
  <span class="text-gray-400">/</span>
169
- <span class="text-gray-300">5 Characters Selected</span>
170
  </div>
171
- </div>
172
  <div class="flex-1 overflow-y-auto pb-32">
173
  <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5 gap-8 max-w-7xl mx-auto">
174
  <!-- World character cards will be dynamically inserted here -->
@@ -358,14 +358,12 @@
358
  const availableCharacters = characterData.filter(char => char.id !== gameState.selectedCharacter.id);
359
  populateWorldSelection(availableCharacters);
360
  }
361
-
362
  function startGame() {
363
- if (gameState.selectedWorldCharacters.length < 5) {
364
- alert('Please select 5 characters for your world!');
365
  return;
366
  }
367
-
368
- document.getElementById('world-selection').classList.add('opacity-0', 'pointer-events-none');
369
  document.getElementById('game-ui').classList.remove('opacity-0');
370
 
371
  // Initialize Three.js world
@@ -436,21 +434,21 @@ card.addEventListener('click', () => {
436
  card.classList.remove('ring-2', 'ring-green-500');
437
  card.querySelector('p').textContent = 'Click to select';
438
  } else {
439
- // Select if we have less than 5
440
- if (gameState.selectedWorldCharacters.length < 5) {
441
- gameState.selectedWorldCharacters.push(character);
442
- card.classList.add('ring-2', 'ring-green-500');
443
- card.querySelector('p').textContent = 'Click to deselect';
444
- }
445
  }
 
446
 
447
  // Update start world button
448
- if (gameState.selectedWorldCharacters.length === 5) {
449
- document.getElementById('start-world').classList.remove('opacity-0');
450
- } else {
451
- document.getElementById('start-world').classList.add('opacity-0');
452
- }
453
- });
454
 
455
  container.appendChild(card);
456
  });
 
162
  <div class="container mx-auto px-6 py-8 h-full flex flex-col relative z-10">
163
  <div class="text-center mb-12">
164
  <h2 class="text-5xl font-black mb-4 gradient-text">Forge Your Universe</h2>
165
+ <p class="text-xl text-gray-300 max-w-2xl mx-auto">Select 2 unique characters to populate your world. Each will bring their own stories and interactions to your adventure.</p>
166
  <div class="mt-4 inline-flex items-center space-x-4 bg-white/5 rounded-full px-6 py-3 border border-white/10">
167
  <span class="text-green-400 font-semibold" id="selected-count">0</span>
168
  <span class="text-gray-400">/</span>
169
+ <span class="text-gray-300">2 Characters Selected</span>
170
  </div>
171
+ </div>
172
  <div class="flex-1 overflow-y-auto pb-32">
173
  <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5 gap-8 max-w-7xl mx-auto">
174
  <!-- World character cards will be dynamically inserted here -->
 
358
  const availableCharacters = characterData.filter(char => char.id !== gameState.selectedCharacter.id);
359
  populateWorldSelection(availableCharacters);
360
  }
 
361
  function startGame() {
362
+ if (gameState.selectedWorldCharacters.length < 2) {
363
+ alert('Please select 2 characters for your world!');
364
  return;
365
  }
366
+ document.getElementById('world-selection').classList.add('opacity-0', 'pointer-events-none');
 
367
  document.getElementById('game-ui').classList.remove('opacity-0');
368
 
369
  // Initialize Three.js world
 
434
  card.classList.remove('ring-2', 'ring-green-500');
435
  card.querySelector('p').textContent = 'Click to select';
436
  } else {
437
+ // Select if we have less than 2
438
+ if (gameState.selectedWorldCharacters.length < 2) {
439
+ gameState.selectedWorldCharacters.push(character);
440
+ card.classList.add('ring-2', 'ring-green-500');
441
+ card.querySelector('p').textContent = 'Click to deselect';
 
442
  }
443
+ }
444
 
445
  // Update start world button
446
+ if (gameState.selectedWorldCharacters.length === 2) {
447
+ document.getElementById('start-world').classList.remove('opacity-0');
448
+ } else {
449
+ document.getElementById('start-world').classList.add('opacity-0');
450
+ }
451
+ });
452
 
453
  container.appendChild(card);
454
  });