{"id":516605,"student_id":1444,"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\ncreateSound('bgm.mp3',true);\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 createSound('bomb.mp3')\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 createSound('pump.mp3')\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 createSound('pump.mp3')\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":"2023-04-11T21:13:43.360+08:00","updated_at":"2023-04-11T21:18:55.972+08:00","name":"叩叮灌水球(延伸版) 副本","language":"javascript","screenshot":{"url":"https://cdn4.koding.school/uploads/project/screenshot/516605/02caf3b19cb7b92ca3c925fcf8a4ea51.jpg"},"parent_id":470335,"plugin":"Game.set({width: 1200, height: 900})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":41,"hashid":"4y3szqm29","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":11761198,"file_name":"p2_s3.png","project_id":516605,"asset_id":588689,"created_at":"2023-04-11T21:13:43.371+08:00","updated_at":"2023-04-11T21:13:43.371+08:00"},{"id":11761199,"file_name":"p2_s2.png","project_id":516605,"asset_id":588690,"created_at":"2023-04-11T21:13:43.378+08:00","updated_at":"2023-04-11T21:13:43.378+08:00"},{"id":11761200,"file_name":"p2_s1.png","project_id":516605,"asset_id":588691,"created_at":"2023-04-11T21:13:43.379+08:00","updated_at":"2023-04-11T21:13:43.379+08:00"},{"id":11761201,"file_name":"p2_s0.png","project_id":516605,"asset_id":588692,"created_at":"2023-04-11T21:13:43.381+08:00","updated_at":"2023-04-11T21:13:43.381+08:00"},{"id":11761202,"file_name":"p2_balloon.png","project_id":516605,"asset_id":588693,"created_at":"2023-04-11T21:13:43.382+08:00","updated_at":"2023-04-11T21:13:43.382+08:00"},{"id":11761203,"file_name":"p2_5.png","project_id":516605,"asset_id":588694,"created_at":"2023-04-11T21:13:43.385+08:00","updated_at":"2023-04-11T21:13:43.385+08:00"},{"id":11761204,"file_name":"p2_4.png","project_id":516605,"asset_id":588695,"created_at":"2023-04-11T21:13:43.388+08:00","updated_at":"2023-04-11T21:13:43.388+08:00"},{"id":11761205,"file_name":"p2_3.png","project_id":516605,"asset_id":588696,"created_at":"2023-04-11T21:13:43.389+08:00","updated_at":"2023-04-11T21:13:43.389+08:00"},{"id":11761206,"file_name":"p2_2.png","project_id":516605,"asset_id":588697,"created_at":"2023-04-11T21:13:43.390+08:00","updated_at":"2023-04-11T21:13:43.390+08:00"},{"id":11761207,"file_name":"p2_1.png","project_id":516605,"asset_id":588698,"created_at":"2023-04-11T21:13:43.392+08:00","updated_at":"2023-04-11T21:13:43.392+08:00"},{"id":11761208,"file_name":"p2_0.png","project_id":516605,"asset_id":588699,"created_at":"2023-04-11T21:13:43.394+08:00","updated_at":"2023-04-11T21:13:43.394+08:00"},{"id":11761209,"file_name":"p1_s3.png","project_id":516605,"asset_id":588700,"created_at":"2023-04-11T21:13:43.395+08:00","updated_at":"2023-04-11T21:13:43.395+08:00"},{"id":11761210,"file_name":"p1_s2.png","project_id":516605,"asset_id":588701,"created_at":"2023-04-11T21:13:43.397+08:00","updated_at":"2023-04-11T21:13:43.397+08:00"},{"id":11761211,"file_name":"p1_s1.png","project_id":516605,"asset_id":588702,"created_at":"2023-04-11T21:13:43.398+08:00","updated_at":"2023-04-11T21:13:43.398+08:00"},{"id":11761212,"file_name":"p1_s0.png","project_id":516605,"asset_id":588703,"created_at":"2023-04-11T21:13:43.399+08:00","updated_at":"2023-04-11T21:13:43.399+08:00"},{"id":11761213,"file_name":"p1_balloon.png","project_id":516605,"asset_id":588704,"created_at":"2023-04-11T21:13:43.401+08:00","updated_at":"2023-04-11T21:13:43.401+08:00"},{"id":11761214,"file_name":"p1_5.png","project_id":516605,"asset_id":588705,"created_at":"2023-04-11T21:13:43.403+08:00","updated_at":"2023-04-11T21:13:43.403+08:00"},{"id":11761215,"file_name":"p1_4.png","project_id":516605,"asset_id":588706,"created_at":"2023-04-11T21:13:43.404+08:00","updated_at":"2023-04-11T21:13:43.404+08:00"},{"id":11761216,"file_name":"p1_1.png","project_id":516605,"asset_id":588707,"created_at":"2023-04-11T21:13:43.406+08:00","updated_at":"2023-04-11T21:13:43.406+08:00"},{"id":11761217,"file_name":"p1_2.png","project_id":516605,"asset_id":588708,"created_at":"2023-04-11T21:13:43.407+08:00","updated_at":"2023-04-11T21:13:43.407+08:00"},{"id":11761218,"file_name":"p1_3.png","project_id":516605,"asset_id":588709,"created_at":"2023-04-11T21:13:43.409+08:00","updated_at":"2023-04-11T21:13:43.409+08:00"},{"id":11761219,"file_name":"p1_0.png","project_id":516605,"asset_id":588710,"created_at":"2023-04-11T21:13:43.411+08:00","updated_at":"2023-04-11T21:13:43.411+08:00"},{"id":11761220,"file_name":"btn_1p.png","project_id":516605,"asset_id":588711,"created_at":"2023-04-11T21:13:43.412+08:00","updated_at":"2023-04-11T21:13:43.412+08:00"},{"id":11761221,"file_name":"info.png","project_id":516605,"asset_id":588712,"created_at":"2023-04-11T21:13:43.414+08:00","updated_at":"2023-04-11T21:13:43.414+08:00"},{"id":11761222,"file_name":"1.png","project_id":516605,"asset_id":588713,"created_at":"2023-04-11T21:13:43.415+08:00","updated_at":"2023-04-11T21:13:43.415+08:00"},{"id":11761223,"file_name":"2.png","project_id":516605,"asset_id":588714,"created_at":"2023-04-11T21:13:43.417+08:00","updated_at":"2023-04-11T21:13:43.417+08:00"},{"id":11761224,"file_name":"3.png","project_id":516605,"asset_id":588715,"created_at":"2023-04-11T21:13:43.419+08:00","updated_at":"2023-04-11T21:13:43.419+08:00"},{"id":11761225,"file_name":"4.png","project_id":516605,"asset_id":588716,"created_at":"2023-04-11T21:13:43.420+08:00","updated_at":"2023-04-11T21:13:43.420+08:00"},{"id":11761226,"file_name":"5.png","project_id":516605,"asset_id":588717,"created_at":"2023-04-11T21:13:43.422+08:00","updated_at":"2023-04-11T21:13:43.422+08:00"},{"id":11761227,"file_name":"btn_2p.png","project_id":516605,"asset_id":588718,"created_at":"2023-04-11T21:13:43.423+08:00","updated_at":"2023-04-11T21:13:43.423+08:00"},{"id":11761228,"file_name":"bg.png","project_id":516605,"asset_id":588719,"created_at":"2023-04-11T21:13:43.425+08:00","updated_at":"2023-04-11T21:13:43.425+08:00"},{"id":11761229,"file_name":"pump.mp3","project_id":516605,"asset_id":588720,"created_at":"2023-04-11T21:13:43.427+08:00","updated_at":"2023-04-11T21:13:43.427+08:00"},{"id":11761230,"file_name":"bomb.mp3","project_id":516605,"asset_id":588721,"created_at":"2023-04-11T21:13:43.428+08:00","updated_at":"2023-04-11T21:13:43.428+08:00"},{"id":11761231,"file_name":"bgm.mp3","project_id":516605,"asset_id":588722,"created_at":"2023-04-11T21:13:43.430+08:00","updated_at":"2023-04-11T21:13:43.430+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦