Altaire commited on
Commit
658d1e1
·
verified ·
1 Parent(s): 48973f6

Add 1 files

Browse files
Files changed (1) hide show
  1. index.html +40 -34
index.html CHANGED
@@ -185,7 +185,7 @@
185
  }
186
 
187
  #start-screen {
188
- position: absolute;
189
  top: 0;
190
  left: 0;
191
  width: 100%;
@@ -197,6 +197,7 @@
197
  align-items: center;
198
  z-index: 200;
199
  text-align: center;
 
200
  }
201
 
202
  #start-title {
@@ -243,6 +244,10 @@
243
  right: 10px;
244
  }
245
 
 
 
 
 
246
  /* Scrollbar styling */
247
  #output::-webkit-scrollbar {
248
  width: 5px;
@@ -272,7 +277,7 @@
272
  opacity: 0;
273
  z-index: 300;
274
  pointer-events: none;
275
- animation: powerOn 2s ease-out;
276
  }
277
 
278
  @keyframes powerOn {
@@ -592,35 +597,45 @@
592
 
593
  // Initialize game with enhanced effects
594
  function initGame() {
 
595
  startButton.disabled = true;
596
  startButton.style.opacity = '0.5';
597
  startButton.style.cursor = 'not-allowed';
 
598
 
599
- // Power sequence effect
600
  const powerEffect = document.createElement('div');
601
  powerEffect.className = 'power-on-effect';
602
  document.body.appendChild(powerEffect);
603
 
 
604
  setTimeout(() => {
 
605
  startScreen.classList.add('hidden');
606
- terminal.classList.remove('hidden');
607
- input.focus();
608
- state.gameActive = true;
609
 
610
- typeText(`SYSTEM OVERRIDE INITIALIZED\n`, 20, () => {
611
- typeText(`CAREER CRISIS SIMULATION v4.3.1\n\n`, 30, () => {
612
- typeText(`Assessment indicates professional existential threat:\n`, 30, () => {
613
- typeText(`AI counterpart demonstrates superior capabilities\n\n`, 30, () => {
614
- typeText(`This simulation will challenge your professional identity\n\n`, 30, showJobSelect);
 
 
 
 
 
 
 
 
615
  });
616
  });
617
  });
618
- });
619
-
620
- setTimeout(() => {
621
- powerEffect.remove();
622
- }, 2000);
623
- }, 200);
 
624
  }
625
 
626
  // Show job selection with more personality
@@ -958,22 +973,13 @@
958
 
959
  // Initialize button with improved UX
960
  window.addEventListener('DOMContentLoaded', () => {
961
- const button = document.getElementById('start-button');
962
-
963
- // Click handler with visual feedback
964
- button.addEventListener('mouseup', (e) => {
965
- if (e.button === 0) { // Left click
966
- e.preventDefault();
967
- button.style.transform = 'translateY(1px)';
968
- setTimeout(() => {
969
- button.style.transform = '';
970
- initGame();
971
- }, 150);
972
- }
973
  });
974
 
975
  // Keyboard support
976
- button.addEventListener('keypress', (e) => {
977
  if (e.key === 'Enter') {
978
  e.preventDefault();
979
  initGame();
@@ -981,12 +987,12 @@
981
  });
982
 
983
  // Focus visual
984
- button.addEventListener('focus', () => {
985
- button.style.boxShadow = '0 0 10px rgba(0, 255, 65, 0.7)';
986
  });
987
 
988
- button.addEventListener('blur', () => {
989
- button.style.boxShadow = '';
990
  });
991
  });
992
  </script>
 
185
  }
186
 
187
  #start-screen {
188
+ position: fixed;
189
  top: 0;
190
  left: 0;
191
  width: 100%;
 
197
  align-items: center;
198
  z-index: 200;
199
  text-align: center;
200
+ pointer-events: all;
201
  }
202
 
203
  #start-title {
 
244
  right: 10px;
245
  }
246
 
247
+ #start-button:active {
248
+ transform: translateY(1px);
249
+ }
250
+
251
  /* Scrollbar styling */
252
  #output::-webkit-scrollbar {
253
  width: 5px;
 
277
  opacity: 0;
278
  z-index: 300;
279
  pointer-events: none;
280
+ animation: powerOn 1s ease-out;
281
  }
282
 
283
  @keyframes powerOn {
 
597
 
598
  // Initialize game with enhanced effects
599
  function initGame() {
600
+ // Disable button to prevent multiple clicks
601
  startButton.disabled = true;
602
  startButton.style.opacity = '0.5';
603
  startButton.style.cursor = 'not-allowed';
604
+ startButton.textContent = "INITIALIZING...";
605
 
606
+ // Create power effect
607
  const powerEffect = document.createElement('div');
608
  powerEffect.className = 'power-on-effect';
609
  document.body.appendChild(powerEffect);
610
 
611
+ // Set timeout for transition to ensure it completes
612
  setTimeout(() => {
613
+ // Hide start screen after animation
614
  startScreen.classList.add('hidden');
 
 
 
615
 
616
+ // Ensure terminal is properly initialized before showing
617
+ setTimeout(() => {
618
+ terminal.classList.remove('hidden');
619
+ input.focus();
620
+ state.gameActive = true;
621
+
622
+ // Begin typing animation
623
+ typeText(`SYSTEM OVERRIDE INITIALIZED\n`, 20, () => {
624
+ typeText(`CAREER CRISIS SIMULATION v4.3.1\n\n`, 30, () => {
625
+ typeText(`Assessment indicates professional existential threat:\n`, 30, () => {
626
+ typeText(`AI counterpart demonstrates superior capabilities\n\n`, 30, () => {
627
+ typeText(`This simulation will challenge your professional identity\n\n`, 30, showJobSelect);
628
+ });
629
  });
630
  });
631
  });
632
+
633
+ // Remove power effect after full transition
634
+ setTimeout(() => {
635
+ powerEffect.remove();
636
+ }, 1000);
637
+ }, 300); // Added slight delay to ensure CSS transition
638
+ }, 100);
639
  }
640
 
641
  // Show job selection with more personality
 
973
 
974
  // Initialize button with improved UX
975
  window.addEventListener('DOMContentLoaded', () => {
976
+ startButton.addEventListener('click', (e) => {
977
+ e.preventDefault();
978
+ initGame();
 
 
 
 
 
 
 
 
 
979
  });
980
 
981
  // Keyboard support
982
+ startButton.addEventListener('keypress', (e) => {
983
  if (e.key === 'Enter') {
984
  e.preventDefault();
985
  initGame();
 
987
  });
988
 
989
  // Focus visual
990
+ startButton.addEventListener('focus', () => {
991
+ startButton.style.boxShadow = '0 0 10px rgba(0, 255, 65, 0.7)';
992
  });
993
 
994
+ startButton.addEventListener('blur', () => {
995
+ startButton.style.boxShadow = '';
996
  });
997
  });
998
  </script>