190 lines
6.9 KiB
HTML
190 lines
6.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
|
<title>Escape From Teacher</title>
|
|
<link rel="stylesheet" href="style.css">
|
|
<style>
|
|
/* DEBUG: Force menu visibility */
|
|
#menu {
|
|
position: fixed !important;
|
|
top: 0 !important;
|
|
left: 0 !important;
|
|
width: 100% !important;
|
|
height: 100% !important;
|
|
background: rgba(0, 0, 0, 0.95) !important;
|
|
z-index: 10000 !important;
|
|
display: flex !important;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<button id="mute-btn" onclick="toggleAudio()">🔊</button>
|
|
|
|
<div id="rotate-overlay">
|
|
<div class="icon">📱↻</div>
|
|
<p>Bitte Gerät drehen!</p>
|
|
<small>Querformat benötigt</small>
|
|
</div>
|
|
|
|
<div id="game-container">
|
|
<!-- MAIN MENU -->
|
|
<div id="menu" class="overlay-screen">
|
|
<div id="startScreen">
|
|
<div class="start-left">
|
|
<h1>ESCAPE FROM<br>TEACHER</h1>
|
|
|
|
<p style="font-size: 12px; color: #aaa;">Dein Rekord: <span id="localHighscore" style="color:yellow">0</span></p>
|
|
|
|
<input type="text" id="playerName" placeholder="NAME (4 ZEICHEN)" maxlength="15" style="text-transform:uppercase;">
|
|
|
|
<button id="startBtn" onclick="startSoloGame()">SOLO STARTEN</button>
|
|
<button id="coopBtn" onclick="showCoopMenu()">CO-OP SPIELEN</button>
|
|
|
|
<div class="info-box">
|
|
<div class="info-title">SCHUL-NEWS</div>
|
|
<p>
|
|
• Der Lehrer ist hinter dir her!<br>
|
|
• Spring über Hindernisse.<br>
|
|
• Sammle Power-Ups für Vorteile!
|
|
</p>
|
|
</div>
|
|
|
|
<div class="info-box">
|
|
<div class="info-title">STEUERUNG</div>
|
|
<p>
|
|
PC: <strong>Leertaste</strong> (Springen), <strong>WASD/Pfeile</strong> (Bewegen)<br>
|
|
Handy: <strong>Bildschirm-Buttons</strong>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="legal-bar">
|
|
<button class="legal-btn" onclick="showLeaderboard()">🏆 TOP 10</button>
|
|
<button class="legal-btn" onclick="showSettings()">⚙️ EINSTELLUNGEN</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="start-right">
|
|
<div class="hall-of-fame-box">
|
|
<h3>🏆 TOP SCHÜLER</h3>
|
|
<div id="startLeaderboardList">Lade...</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- CO-OP MENU -->
|
|
<div id="coopMenu" class="overlay-screen hidden">
|
|
<div class="center-box">
|
|
<h1>CO-OP MODUS</h1>
|
|
|
|
<button class="big-btn" onclick="createRoom()">RAUM ERSTELLEN</button>
|
|
|
|
<div style="margin: 20px 0;">- ODER -</div>
|
|
|
|
<input type="text" id="joinRoomCode" placeholder="RAUM-CODE" maxlength="6" style="text-transform:uppercase;">
|
|
<input type="text" id="teamNameJoin" placeholder="TEAM-NAME" maxlength="15">
|
|
<button onclick="joinRoom()">RAUM BEITRETEN</button>
|
|
|
|
<button class="back-btn" onclick="showMainMenu()">← ZURÜCK</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- SETTINGS MENU -->
|
|
<div id="settingsMenu" class="overlay-screen hidden">
|
|
<div class="center-box">
|
|
<h1>EINSTELLUNGEN</h1>
|
|
|
|
<div class="settings-group">
|
|
<div class="setting-item">
|
|
<label>MUSIK LAUTSTÄRKE:</label>
|
|
<input type="range" id="musicVolume" min="0" max="100" value="70">
|
|
<span id="musicValue">70%</span>
|
|
</div>
|
|
|
|
<div class="setting-item">
|
|
<label>SFX LAUTSTÄRKE:</label>
|
|
<input type="range" id="sfxVolume" min="0" max="100" value="70">
|
|
<span id="sfxValue">70%</span>
|
|
</div>
|
|
</div>
|
|
|
|
<button class="back-btn" onclick="showMainMenu()">← ZURÜCK</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- LEADERBOARD MENU -->
|
|
<div id="leaderboardMenu" class="overlay-screen hidden">
|
|
<div class="center-box">
|
|
<h1>🏆 TOP 10 LEADERBOARD</h1>
|
|
|
|
<div id="leaderboardList" class="leaderboard-box">
|
|
Lade Leaderboard...
|
|
</div>
|
|
|
|
<button class="back-btn" onclick="showMainMenu()">← ZURÜCK</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- LOBBY SCREEN (CO-OP WAITING ROOM) -->
|
|
<div id="lobbyScreen" class="overlay-screen hidden">
|
|
<div class="center-box">
|
|
<h1>LOBBY</h1>
|
|
|
|
<div style="margin: 20px 0;">
|
|
<p style="font-size: 14px; color: #aaa;">Raum-Code:</p>
|
|
<div style="background: rgba(0,0,0,0.6); border: 4px solid #ffcc00; padding: 20px; font-size: 32px; color: #ffcc00; letter-spacing: 4px;">
|
|
<span id="lobbyRoomCode">XXXXX</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="margin: 20px 0; width: 100%; max-width: 400px;">
|
|
<p style="font-size: 14px; color: #aaa; margin-bottom: 10px;">Spieler im Raum:</p>
|
|
<div id="lobbyPlayerList" style="background: rgba(0,0,0,0.5); border: 2px solid #666; padding: 15px; min-height: 100px; font-family: sans-serif; font-size: 14px;">
|
|
<div style="color: #888;">Warte auf Spieler...</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="lobbyHostControls" class="hidden" style="margin: 20px 0;">
|
|
<button class="big-btn" onclick="startGameFromLobby()" style="background: #00cc00;">SPIEL STARTEN</button>
|
|
</div>
|
|
|
|
<p id="lobbyStatus" style="font-size: 12px; color: #ffcc00; margin: 20px 0;">Warte auf Host...</p>
|
|
|
|
<button class="back-btn" onclick="leaveLobby()">← LOBBY VERLASSEN</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- GAME OVER SCREEN -->
|
|
<div id="gameOverScreen" class="overlay-screen hidden">
|
|
<div class="center-box">
|
|
<h1>ERWISCHT!</h1>
|
|
|
|
<p style="font-size: 18px; margin: 20px 0;">
|
|
Dein Score: <span id="finalScore" style="color:yellow; font-size: 24px;">0</span>
|
|
</p>
|
|
|
|
<div id="gameOverLeaderboardList" class="leaderboard-box" style="margin: 20px 0;">
|
|
Lade Leaderboard...
|
|
</div>
|
|
|
|
<button class="big-btn" onclick="location.reload()" style="background: #ff4444; margin-top: 20px;">NOCHMAL SPIELEN</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- LOADING SCREEN -->
|
|
<div id="loading" class="loading-screen">
|
|
<div class="spinner"></div>
|
|
<p>Lade Escape From Teacher...</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- WASM Execution -->
|
|
<script src="wasm_exec.js"></script>
|
|
<script src="game.js"></script>
|
|
|
|
</body>
|
|
</html>
|