{"id":138721,"student_id":10,"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_0.png', 'bird_1.png'); //鳥\nvar hint = createSprite('hint.png'); //開始提示圖\nvar end = createSprite('gameover.png'); //結束提示圖\n\nvar speed = 0; //鳥的墜落速度\nvar score = 0; //遊戲分數\nvar start = false; //是否開始遊戲\n\n// hint.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\ncreateSound('bgm.mp3', true);\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 drawText(score, 10, 10, 'white', 60);\n}\n\n//鳥的墜落 \u0026 翅膀動畫\nfunction moveBird () {\n if (start == true) {\n speed = speed + 0.8;\n bird.y = bird.y + speed;\n }\n if (speed \u003e 0) {\n bird.costumeId = 0;\n }\n if (speed \u003c 0) {\n bird.costumeId = 1;\n }\n}\n\n//鳥的跳躍\nfunction jump () {\n speed = -12;\n start = true;\n createSound('jump.mp3');\n hint.hidden = true;\n}\n\n//遊戲結束\nfunction gameover () {\n stop();\n createSound('gg.mp3');\n end.hidden = false;\n}\n\n","created_at":"2020-04-10T09:43:49.149+08:00","updated_at":"2020-08-20T12:41:08.914+08:00","name":"跳躍吧!小鳥 (完整版)","language":"javascript","screenshot":{"url":"/uploads/project/screenshot/138721/a559d8b9b361ac1588e11c99b6bd8216.jpg"},"parent_id":2,"plugin":"Game.set({ width: 1200, height: 900 });","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":419,"hashid":"p93s6jv2","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2390281,"file_name":"gg.mp3","project_id":138721,"asset_id":203971,"created_at":"2020-04-10T09:44:01.532+08:00","updated_at":"2020-04-10T09:44:01.532+08:00"},{"id":2390289,"file_name":"jump.mp3","project_id":138721,"asset_id":203979,"created_at":"2020-04-10T09:44:01.565+08:00","updated_at":"2020-04-10T09:44:01.565+08:00"},{"id":2390290,"file_name":"bgm.mp3","project_id":138721,"asset_id":203980,"created_at":"2020-04-10T09:44:01.628+08:00","updated_at":"2020-04-10T09:44:01.628+08:00"},{"id":3115751,"file_name":"pipes.png","project_id":138721,"asset_id":202594,"created_at":"2020-08-20T12:40:55.101+08:00","updated_at":"2020-08-20T12:40:55.101+08:00"},{"id":3115747,"file_name":"bird_1.png","project_id":138721,"asset_id":202592,"created_at":"2020-08-20T12:40:53.903+08:00","updated_at":"2020-08-20T12:40:53.903+08:00"},{"id":3115748,"file_name":"gameover.png","project_id":138721,"asset_id":202098,"created_at":"2020-08-20T12:40:53.904+08:00","updated_at":"2020-08-20T12:40:53.904+08:00"},{"id":3115749,"file_name":"ground.png","project_id":138721,"asset_id":202595,"created_at":"2020-08-20T12:40:54.500+08:00","updated_at":"2020-08-20T12:40:54.500+08:00"},{"id":3115750,"file_name":"hint.png","project_id":138721,"asset_id":202593,"created_at":"2020-08-20T12:40:54.501+08:00","updated_at":"2020-08-20T12:40:54.501+08:00"},{"id":3115745,"file_name":"bg.png","project_id":138721,"asset_id":202590,"created_at":"2020-08-20T12:40:53.416+08:00","updated_at":"2020-08-20T12:40:53.416+08:00"},{"id":3115746,"file_name":"bird_0.png","project_id":138721,"asset_id":202591,"created_at":"2020-08-20T12:40:53.418+08:00","updated_at":"2020-08-20T12:40:53.418+08:00"}]
Orange Apple Learning Platform
My Projects
View Project Page
Export
Remix
Import
Delete
Download Android APP (APK)
Screenshot
繁中
简中
English
日本語
1:1:1
1:1
Full Width
Scan the QRCode below with your phone to install
Or you can
download APK
to this computer
Scan the QRCode below with your phone to install
Or you can
download APK
to this computer