iT邦幫忙

2021 iThome 鐵人賽

DAY 17
0
Modern Web

JavaScript 嗨起來用 JS 做動畫 ε= ᕕ( ᐛ )ᕗ系列 第 17

Day17 - 幫蛇多加了暫停與繼續

class Game{
    startGame () {
        this.snake = new Snake();
        this.start = true;
        this.bgm.play();
    };
    pauseGame () {
        this.start = false;
        this.bgm.pause();
    };
    continuedGame () {
        this.start = true;
        this.bgm.play();
    };
}

今天先理解到這邊~如果上述內容有出入,希望路過的朋友能俠義挺身糾正,感恩的心 ε= ᕕ( ᐛ )ᕗ


上一篇
Day16- 讓頁面不再被上下左右上下左右
系列文
JavaScript 嗨起來用 JS 做動畫 ε= ᕕ( ᐛ )ᕗ17
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言