{"id":170610,"student_id":16,"content":"setBackdrop('bg.png');\nvar p1 = createSprite('pipes.png'); //1號水管\nvar p2 = createSprite('pipes.png'); //2號水管\nvar p3 = createSprite('pipes.png'); //3號水管\nvar gd = createSprite('ground.png'); //地板\nvar bird = createSprite('bird_1.png', 'bird_2.png'); //鳥\nvar hint = createSprite('hint.png'); //開始提示圖\nvar end = createSprite('gameover.png'); //結束提示圖\n\nvar speed = 0; //鳥的墜落速度\nvar score = 0; //遊戲分數\nvar start = false; //是否開始遊戲\n\nhint.hidden = true; //隱藏開始提示圖\nend.hidden = true; //隱藏結束提示圖\n\nforever(loop); // 不斷執行遊戲迴圈\non('keydown', jump); //按下任意按鍵使鳥跳躍\nbird.on('touch', [p1, p2, p3, gd], gameover); //當鳥碰撞到障礙物時結束遊戲\n\np1.x = 0;\np2.x = 500;\np3.x = 1000;\n\n// 遊戲主迴圈\nfunction loop () {\n moveGround(); //移動地板\n movePipe(p1); //移動1號水管\n movePipe(p2); //移動2號水管\n movePipe(p3); //移動2號水管\n moveBird(); //移動鳥\n}\n\n//移動地板\nfunction moveGround () {\n gd.x = gd.x - 6;\n if(gd.x \u003c 0){\n gd.x = gd.x + 1200;\n }\n}\n\n//移動水管\nfunction movePipe (pipe) {\n pipe.x = pipe.x - 6;\n if(pipe.x \u003c -100){\n pipe.x = pipe.x + 1500;\n if(start == true){\n pipe.y = Math.random() * 500 + 150;\n score = score + 1;\n }\n \n }\n drawText(score, 10, 10, 'white', 60);\n}\n\n//鳥的墜落 \u0026 翅膀動畫\nfunction moveBird () {\n bird.y = bird.y + speed;\n if(start == true){\n speed = speed + 0.8;\n }\n}\n\n//鳥的跳躍\nfunction jump () {\n speed = -15;\n start = true;\n}\n\n//遊戲結束\nfunction gameover () {\n stop();\n}","created_at":"2020-07-25T11:24:22.571+08:00","updated_at":"2020-07-29T11:09:25.179+08:00","name":"flappy bird(預設版) 副本","language":"javascript","screenshot":{"url":"https://cdn9.koding.school/uploads/project/screenshot/170610/5a212dff73ec83fe6aeea40e58111cd3.jpg"},"parent_id":138721,"plugin":"Game.set({ width: 1200, height: 900 });","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":97,"hashid":"jzms2w26","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2948705,"file_name":"gg.mp3","project_id":170610,"asset_id":203971,"created_at":"2020-07-25T11:24:22.588+08:00","updated_at":"2020-07-25T11:24:22.588+08:00"},{"id":2948696,"file_name":"bgm.mp3","project_id":170610,"asset_id":203980,"created_at":"2020-07-25T11:24:22.578+08:00","updated_at":"2020-07-25T11:24:22.578+08:00"},{"id":2948697,"file_name":"jump.mp3","project_id":170610,"asset_id":203979,"created_at":"2020-07-25T11:24:22.580+08:00","updated_at":"2020-07-25T11:24:22.580+08:00"},{"id":2948698,"file_name":"bg.png","project_id":170610,"asset_id":203978,"created_at":"2020-07-25T11:24:22.581+08:00","updated_at":"2020-07-25T11:24:22.581+08:00"},{"id":2948699,"file_name":"bird_1.png","project_id":170610,"asset_id":203977,"created_at":"2020-07-25T11:24:22.582+08:00","updated_at":"2020-07-25T11:24:22.582+08:00"},{"id":2948700,"file_name":"bird_2.png","project_id":170610,"asset_id":203976,"created_at":"2020-07-25T11:24:22.583+08:00","updated_at":"2020-07-25T11:24:22.583+08:00"},{"id":2948701,"file_name":"gameover.png","project_id":170610,"asset_id":203975,"created_at":"2020-07-25T11:24:22.584+08:00","updated_at":"2020-07-25T11:24:22.584+08:00"},{"id":2948702,"file_name":"ground.png","project_id":170610,"asset_id":203974,"created_at":"2020-07-25T11:24:22.585+08:00","updated_at":"2020-07-25T11:24:22.585+08:00"},{"id":2948703,"file_name":"hint.png","project_id":170610,"asset_id":203973,"created_at":"2020-07-25T11:24:22.586+08:00","updated_at":"2020-07-25T11:24:22.586+08:00"},{"id":2948704,"file_name":"pipes.png","project_id":170610,"asset_id":203972,"created_at":"2020-07-25T11:24:22.587+08:00","updated_at":"2020-07-25T11:24:22.587+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦