INNER CODE UNIT · JavaScript

gameover

city41/breakouts · breakouts/stagejs/app.js:280

  function gameover() {
    updateStatus();
    clear();
    init();
  }

  function init() {
    level = 0, lives = 3, score = 0, over = true;
    updateMessage("Click to start!");
    paddle.ui.hide();
    ui.logo.tween(500).clear(true).pin("alpha", 1);
  }

  stage.on("click", function() {
    if (over) {
      over = false;
      updateMessage("");
      paddle.ui.show();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…