MakeCode Microbit 遊戲設計:簡易射擊遊戲(Microbit Game: Simple Shooting Game)
本篇文章將講解如何製作一個簡易射擊遊戲。 一、遊戲功能如下(Game Design): 砲台在畫面下方移動。The turret moves between the bottom of LED matrix. 按A鍵砲台燈向左移動。 The turret moves to left when button A is pressed. 按B鍵砲台燈向右移動。The turret moves to right when button B is pressed. 按A+B鍵發射子彈。Firing when button A and button B are pressed. 敵機隨機在最上方的位置出現。 The enemy moves between the top of LED matrix. 子彈打到敵機時,得一分。Score 1 point when the enemy is hit by a bullet. 二、積木程式(Blocks Code) 遊戲啟動時(On Start): 敵機隨機在最上方的位置出現。 The enemy moves between the top of LED matrix. 砲台在畫面下方移動。The turret moves between the bottom of LED matrix. 按A鍵砲台燈向左移動。 The turret moves to left when button A is pressed. 按B鍵砲台燈向右移動。The turret moves to right when button B is pressed. 按A+B鍵發射子彈。Firing when button A and button B are pressed. 子彈打到敵機時,得一分,。Score 1 point when the enemy is hit by a bullet. 三、結果(The Results) 影片(Demo Video): 請自由發揮額外功能,例如玩家生命等。 More Ideas examples: player's life...etc. 範例網址(Example Code): https://makecode.microbit.org/_EEAd7hdq8hav 若您覺得文章寫得不錯,請點選文章上的廣...