소스 검색

improved things

master
mort 8 년 전
부모
커밋
ed54f63abb
3개의 변경된 파일12개의 추가작업 그리고 5개의 파일을 삭제
  1. 1
    1
      es/game.js
  2. 6
    1
      es/script.js
  3. 5
    3
      index.html

+ 1
- 1
es/game.js 파일 보기

@@ -392,7 +392,7 @@ class Player extends Entity {
this.thrustAnim.loop = false;
this.game.playSound(PlayerSounds.despawn, this.pos);
if (this.thrustSound)
this.thrustSound.stop();
this.thrustSound.pause();
}
}


+ 6
- 1
es/script.js 파일 보기

@@ -20,10 +20,15 @@ function startGame(name) {
game.onloss = () => view("game-over");
}

document.querySelector("#startGameBtn").addEventListener("click", startGame);
document.querySelector("#startForm").addEventListener("submit", (evt) => {
evt.preventDefault();
startGame();
});

document.querySelector("#restartGameBtn").addEventListener("click", () => {
location.reload();
});

document.querySelector("#storyBtn").addEventListener("click", () => {
location.hash = "";
location.reload();

+ 5
- 3
index.html 파일 보기

@@ -68,9 +68,11 @@
<p>Umbreosylians are a fickle race. At the first sign of danger, of course, everyone you knew flew away to migrate to a safe place. Except you. You overslept, missed the ships, and are now abandoned.</p>

<p>You barely managed to enter your ship, lift off, and get to a somewhat safe distance from the planet, before The Deathers destroyed Umbreosyl. You're currently sitting in your space ship, blood boiling, watching the debris from your beloved home planet encounter you from behind, and ships from The Deathers from ahead.</p>
<input id="playerName" placeholder="Name"></input>
<button id="startGameBtn">Start</button>

<form id="startForm">
<input id="playerName" placeholder="Name"></input>
<button type="submit" id="startGameBtn">Start</button>
</form>
</div>

<div class="view game">

Loading…
취소
저장