{"id":472961,"student_id":2589,"content":"setBackdrop(\"bg.png\"); //設定背景圖\nlet p1_balloon = createSprite(\"p2_balloon.png\"); // 紅色水球\nlet p2_balloon = createSprite(\"p1_balloon.png\"); // 紫色水球\nlet p1_hint = createSprite(\"p1_s0.png\", \"p1_s1.png\", \"p1_s2.png\", \"p1_s3.png\"); // 紅色玩家按鍵提示\nlet p2_hint = createSprite(\"p2_s0.png\", \"p2_s1.png\", \"p2_s2.png\", \"p2_s3.png\"); // 紫色玩家按鍵提示\nlet p1 = createSprite(\"p1_0.png\", \"p1_1.png\", \"p1_2.png\", \"p1_3.png\", \"p1_4.png\", \"p1_5.png\"); // 紅色玩家\nlet p2 = createSprite(\"p2_0.png\", \"p2_1.png\", \"p2_2.png\", \"p2_3.png\", \"p2_4.png\", \"p2_5.png\"); // 紫色玩家\nlet number = createSprite(\"5.png\", \"4.png\", \"3.png\", \"2.png\", \"1.png\"); // 倒數計時\nlet info = createSprite(\"info.png\");\nlet btn_1p = createSprite(\"btn_1p.png\");\nlet btn_2p = createSprite(\"btn_2p.png\");\n\nlet clock = 0; // 紀錄遊戲迴圈執行的次數\nlet auto = false;\n\np1.moveTo(400, 650);\np2.moveTo(800, 650);\np1_hint.moveTo(200, 50);\np2_hint.moveTo(1000, 50);\np1_balloon.moveTo(800, 50);\np2_balloon.moveTo(400, 50);\n\np1_balloon.scale = 0.3;\np2_balloon.scale = 0.3;\n\n// 遊戲主迴圈\nfunction gameloop () {\n if (p1_balloon.scale \u003e 1) {\n p1.costumeId = 4;\n p2.costumeId = 5;\n p1_balloon.hidden = true;\n stop();\n }\n if (p2_balloon.scale \u003e 1) {\n p2.costumeId = 4;\n p1.costumeId = 5;\n p2_balloon.hidden = true;\n stop();\n }\n\n if (info.hidden) {\n clock++;\n }\n\n if (clock == 60) number.costumeId = 1;\n if (clock == 120) number.costumeId = 2;\n if (clock == 180) number.costumeId = 3;\n if (clock == 240) number.costumeId = 4;\n if (clock == 300) {\n number.hidden = true;\n p1_hint.costumeId = 1;\n p2_hint.costumeId = 1;\n }\n \n if (auto == true) {\n if (clock % 12 == 0) pressI();\n if (clock % 12 == 4) pressO();\n if (clock % 12 == 8) pressP();\n }\n}\n\nfunction pressZ () {\n if (p1_hint.costumeId == 3) {\n p1.costumeId = 1;\n p1_hint.costumeId = 1;\n p1_balloon.scale += 0.005;\n }\n}\n\nfunction pressX () {\n if (p1_hint.costumeId == 1) {\n p1.costumeId = 2;\n p1_hint.costumeId = 2;\n p1_balloon.scale += 0.005;\n }\n}\n\nfunction pressC () {\n if (p1_hint.costumeId == 2) {\n p1.costumeId = 3;\n p1_hint.costumeId = 3;\n p1_balloon.scale += 0.005;\n }\n}\n\nfunction pressI () {\n if (p2_hint.costumeId == 3) {\n p2.costumeId = 1;\n p2_hint.costumeId = 1;\n p2_balloon.scale += 0.005;\n }\n}\n\nfunction pressO () {\n if (p2_hint.costumeId == 1) {\n p2.costumeId = 2;\n p2_hint.costumeId = 2;\n p2_balloon.scale += 0.005;\n }\n}\n\nfunction pressP () {\n if (p2_hint.costumeId == 2) {\n p2.costumeId = 3;\n p2_hint.costumeId = 3;\n p2_balloon.scale += 0.005;\n }\n}\n\nfunction mode_1p () {\n info.hidden = true;\n btn_1p.hidden = true;\n btn_2p.hidden = true;\n auto = true;\n}\n\nfunction mode_2p () {\n info.hidden = true;\n btn_1p.hidden = true;\n btn_2p.hidden = true;\n}\n\nforever(gameloop); // 不斷執行遊戲迴圈\non('keydown', 'z', pressZ); // 當按下 z 按鍵時\non('keydown', 'x', pressX); // 當按下 x 按鍵時\non('keydown', 'c', pressC); // 當按下 c 按鍵時\non('keydown', 'i', pressI); // 當按下 i 按鍵時\non('keydown', 'o', pressO); // 當按下 o 按鍵時\non('keydown', 'p', pressP); // 當按下 p 按鍵時\n\nbtn_1p.on('click', mode_1p);\nbtn_2p.on('click', mode_2p);","created_at":"2022-12-12T15:18:04.530+08:00","updated_at":"2023-03-14T10:00:07.497+08:00","name":"叩叮灌水球 - 開始後用滑鼠點擊舞台以啟用按鍵,重整畫面即可重新遊戲。","language":"javascript","screenshot":{"url":"https://cdn3.koding.school/uploads/project/screenshot/472961/7c45b9610634607d7619f78081890aba.jpg"},"parent_id":470335,"plugin":"Game.set({width: 1200, height: 900})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":54,"hashid":"6rps2y9ym","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":10761270,"file_name":"p2_s3.png","project_id":472961,"asset_id":588689,"created_at":"2022-12-12T15:18:04.536+08:00","updated_at":"2022-12-12T15:18:04.536+08:00"},{"id":10761271,"file_name":"p2_s2.png","project_id":472961,"asset_id":588690,"created_at":"2022-12-12T15:18:04.539+08:00","updated_at":"2022-12-12T15:18:04.539+08:00"},{"id":10761272,"file_name":"p2_s1.png","project_id":472961,"asset_id":588691,"created_at":"2022-12-12T15:18:04.540+08:00","updated_at":"2022-12-12T15:18:04.540+08:00"},{"id":10761273,"file_name":"p2_s0.png","project_id":472961,"asset_id":588692,"created_at":"2022-12-12T15:18:04.541+08:00","updated_at":"2022-12-12T15:18:04.541+08:00"},{"id":10761274,"file_name":"p2_balloon.png","project_id":472961,"asset_id":588693,"created_at":"2022-12-12T15:18:04.543+08:00","updated_at":"2022-12-12T15:18:04.543+08:00"},{"id":10761275,"file_name":"p2_5.png","project_id":472961,"asset_id":588694,"created_at":"2022-12-12T15:18:04.544+08:00","updated_at":"2022-12-12T15:18:04.544+08:00"},{"id":10761276,"file_name":"p2_4.png","project_id":472961,"asset_id":588695,"created_at":"2022-12-12T15:18:04.545+08:00","updated_at":"2022-12-12T15:18:04.545+08:00"},{"id":10761277,"file_name":"p2_3.png","project_id":472961,"asset_id":588696,"created_at":"2022-12-12T15:18:04.547+08:00","updated_at":"2022-12-12T15:18:04.547+08:00"},{"id":10761278,"file_name":"p2_2.png","project_id":472961,"asset_id":588697,"created_at":"2022-12-12T15:18:04.548+08:00","updated_at":"2022-12-12T15:18:04.548+08:00"},{"id":10761279,"file_name":"p2_1.png","project_id":472961,"asset_id":588698,"created_at":"2022-12-12T15:18:04.549+08:00","updated_at":"2022-12-12T15:18:04.549+08:00"},{"id":10761280,"file_name":"p2_0.png","project_id":472961,"asset_id":588699,"created_at":"2022-12-12T15:18:04.550+08:00","updated_at":"2022-12-12T15:18:04.550+08:00"},{"id":10761281,"file_name":"p1_s3.png","project_id":472961,"asset_id":588700,"created_at":"2022-12-12T15:18:04.552+08:00","updated_at":"2022-12-12T15:18:04.552+08:00"},{"id":10761282,"file_name":"p1_s2.png","project_id":472961,"asset_id":588701,"created_at":"2022-12-12T15:18:04.553+08:00","updated_at":"2022-12-12T15:18:04.553+08:00"},{"id":10761283,"file_name":"p1_s1.png","project_id":472961,"asset_id":588702,"created_at":"2022-12-12T15:18:04.554+08:00","updated_at":"2022-12-12T15:18:04.554+08:00"},{"id":10761284,"file_name":"p1_s0.png","project_id":472961,"asset_id":588703,"created_at":"2022-12-12T15:18:04.556+08:00","updated_at":"2022-12-12T15:18:04.556+08:00"},{"id":10761285,"file_name":"p1_balloon.png","project_id":472961,"asset_id":588704,"created_at":"2022-12-12T15:18:04.557+08:00","updated_at":"2022-12-12T15:18:04.557+08:00"},{"id":10761286,"file_name":"p1_5.png","project_id":472961,"asset_id":588705,"created_at":"2022-12-12T15:18:04.558+08:00","updated_at":"2022-12-12T15:18:04.558+08:00"},{"id":10761287,"file_name":"p1_4.png","project_id":472961,"asset_id":588706,"created_at":"2022-12-12T15:18:04.559+08:00","updated_at":"2022-12-12T15:18:04.559+08:00"},{"id":10761288,"file_name":"p1_1.png","project_id":472961,"asset_id":588707,"created_at":"2022-12-12T15:18:04.561+08:00","updated_at":"2022-12-12T15:18:04.561+08:00"},{"id":10761289,"file_name":"p1_2.png","project_id":472961,"asset_id":588708,"created_at":"2022-12-12T15:18:04.562+08:00","updated_at":"2022-12-12T15:18:04.562+08:00"},{"id":10761290,"file_name":"p1_3.png","project_id":472961,"asset_id":588709,"created_at":"2022-12-12T15:18:04.563+08:00","updated_at":"2022-12-12T15:18:04.563+08:00"},{"id":10761291,"file_name":"p1_0.png","project_id":472961,"asset_id":588710,"created_at":"2022-12-12T15:18:04.564+08:00","updated_at":"2022-12-12T15:18:04.564+08:00"},{"id":10761292,"file_name":"btn_1p.png","project_id":472961,"asset_id":588711,"created_at":"2022-12-12T15:18:04.565+08:00","updated_at":"2022-12-12T15:18:04.565+08:00"},{"id":10761293,"file_name":"info.png","project_id":472961,"asset_id":588712,"created_at":"2022-12-12T15:18:04.566+08:00","updated_at":"2022-12-12T15:18:04.566+08:00"},{"id":10761294,"file_name":"1.png","project_id":472961,"asset_id":588713,"created_at":"2022-12-12T15:18:04.568+08:00","updated_at":"2022-12-12T15:18:04.568+08:00"},{"id":10761295,"file_name":"2.png","project_id":472961,"asset_id":588714,"created_at":"2022-12-12T15:18:04.569+08:00","updated_at":"2022-12-12T15:18:04.569+08:00"},{"id":10761296,"file_name":"3.png","project_id":472961,"asset_id":588715,"created_at":"2022-12-12T15:18:04.570+08:00","updated_at":"2022-12-12T15:18:04.570+08:00"},{"id":10761297,"file_name":"4.png","project_id":472961,"asset_id":588716,"created_at":"2022-12-12T15:18:04.572+08:00","updated_at":"2022-12-12T15:18:04.572+08:00"},{"id":10761298,"file_name":"5.png","project_id":472961,"asset_id":588717,"created_at":"2022-12-12T15:18:04.573+08:00","updated_at":"2022-12-12T15:18:04.573+08:00"},{"id":10761299,"file_name":"btn_2p.png","project_id":472961,"asset_id":588718,"created_at":"2022-12-12T15:18:04.574+08:00","updated_at":"2022-12-12T15:18:04.574+08:00"},{"id":10761300,"file_name":"bg.png","project_id":472961,"asset_id":588719,"created_at":"2022-12-12T15:18:04.575+08:00","updated_at":"2022-12-12T15:18:04.575+08:00"},{"id":10761301,"file_name":"pump.mp3","project_id":472961,"asset_id":588720,"created_at":"2022-12-12T15:18:04.577+08:00","updated_at":"2022-12-12T15:18:04.577+08:00"},{"id":10761302,"file_name":"bomb.mp3","project_id":472961,"asset_id":588721,"created_at":"2022-12-12T15:18:04.578+08:00","updated_at":"2022-12-12T15:18:04.578+08:00"},{"id":10761303,"file_name":"bgm.mp3","project_id":472961,"asset_id":588722,"created_at":"2022-12-12T15:18:04.579+08:00","updated_at":"2022-12-12T15:18:04.579+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦