{"id":325949,"student_id":10,"content":"createSprite('bg.png'); //設定背景圖\nlet board = createSprite(\"board.png\"); //木板\nlet tongueR = createSprite(\"tongue_r_1.png\", \"tongue_r_2.png\"); //紅色青蛙的舌頭\nlet tongueB = createSprite(\"tongue_b_1.png\", \"tongue_b_2.png\"); //藍色青蛙的舌頭\nlet frogR = createSprite(\"frog_r_0.png\", \"frog_r_1.png\"); //紅色青蛙\nlet frogB = createSprite(\"frog_b_0.png\", \"frog_b_1.png\"); //藍色青蛙\nlet fly1 = createSprite(\"fly_red.png\", \"fly_blue.png\", \"koding_1.png\", \"koding_2.png\"); //目標1\nlet fly2 = createSprite(\"fly_red.png\", \"fly_blue.png\", \"koding_1.png\", \"koding_2.png\"); //目標2\nlet fly3 = createSprite(\"fly_red.png\", \"fly_blue.png\", \"koding_1.png\", \"koding_2.png\"); //目標3\nlet fly4 = createSprite(\"fly_red.png\", \"fly_blue.png\", \"koding_1.png\", \"koding_2.png\"); //目標4\nlet fly5 = createSprite(\"fly_red.png\", \"fly_blue.png\", \"koding_1.png\", \"koding_2.png\"); //目標5\n\nlet vyR = 0; //紅色舌頭的速度\nlet vyB = 0; //藍色舌頭的速度\nlet score = 0; //分數\nlet clock = 0; //迴圈次數\nlet timer = 0; //遊戲時間\n\ntongueR.moveTo(150, 700);\ntongueB.moveTo(450, 700);\nfrogR.moveTo(150, 750);\nfrogB.moveTo(450, 750);\n\nfly1.moveTo(0, 200);\nfly2.moveTo(300, 200);\nfly3.moveTo(600, 200);\nfly4.moveTo(900, 200);\nfly5.moveTo(1200, 200);\n\n// 遊戲主迴圈\nfunction gameloop () {\n\n print('剩餘時間: ' + timer, 740, 700, 'black', 40);\n print('捕捉成功: ' + score, 740, 760, 'white', 40);\n\n tongueR.y += vyR; // 根據數值改變垂直位置\n if (tongueR.y \u003c 200) {\n vyR = 50; // 往下移動\n }\n if (key.o \u0026\u0026 tongueR.y \u003e= 700) {\n vyR = -50; //往上移動\n tongueR.y = 700; //發射前位置\n tongueR.costumeId = 0; //恢復造型\n }\n\n // fly1.x -= 15; // 向左移動\n // if (fly1.x \u003c= -150) {\n // fly1.x += 300 * 5; // 重置到場景右側\n // }\n}\n\n// 更新蜻蜓角色\nfunction updateFly(fly) {\n \n // if (fly.costumeId == 0 \u0026\u0026 fly.touched(tongueR)) {\n // fly.hidden = true; // 隱藏蜻蜓\n // tongueR.costumeId = 1; // 舌頭黏到蜻蜓\n // score++; // 分數加一\n // }\n\n // if (fly.costumeId == 2 \u0026\u0026 fly.touched(tongueR)) {\n // frogR.costumeId = 1; //紅色青蛙切驚嚇\n // fly.costumeId = 3; //叩叮蜻蜓生氣\n // stop(); //停止遊戲\n // }\n\n}\n\nforever(gameloop); //不斷執行遊戲迴圈","created_at":"2021-12-13T10:12:18.216+08:00","updated_at":"2022-03-01T17:01:37.839+08:00","name":"補蜻蜓大作戰(預設版) (2)","language":"javascript","screenshot":{"url":"https://cdn6.koding.school/uploads/project/screenshot/325949/b230fa3bcc0fafe3f75ee57f07ce202f.jpg"},"parent_id":2,"plugin":"Game.set({width: 1200, height: 900})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":201,"hashid":"rdvs6yd4g","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":7613913,"file_name":"fail.mp3","project_id":325949,"asset_id":481620,"created_at":"2022-03-01T17:01:37.754+08:00","updated_at":"2022-03-01T17:01:37.754+08:00"},{"id":7613914,"file_name":"koding_2.png","project_id":325949,"asset_id":481621,"created_at":"2022-03-01T17:01:37.758+08:00","updated_at":"2022-03-01T17:01:37.758+08:00"},{"id":7613915,"file_name":"timeout.png","project_id":325949,"asset_id":481622,"created_at":"2022-03-01T17:01:37.762+08:00","updated_at":"2022-03-01T17:01:52.086+08:00"},{"id":7613916,"file_name":"tongue_r_2.png","project_id":325949,"asset_id":481623,"created_at":"2022-03-01T17:01:37.767+08:00","updated_at":"2022-03-01T17:01:37.767+08:00"},{"id":7613917,"file_name":"tongue_r_1.png","project_id":325949,"asset_id":481624,"created_at":"2022-03-01T17:01:37.770+08:00","updated_at":"2022-03-01T17:01:37.770+08:00"},{"id":7613918,"file_name":"tongue_b_2.png","project_id":325949,"asset_id":481625,"created_at":"2022-03-01T17:01:37.774+08:00","updated_at":"2022-03-01T17:01:37.774+08:00"},{"id":7613919,"file_name":"tongue_b_1.png","project_id":325949,"asset_id":481626,"created_at":"2022-03-01T17:01:37.778+08:00","updated_at":"2022-03-01T17:01:37.778+08:00"},{"id":7613920,"file_name":"koding_1.png","project_id":325949,"asset_id":481627,"created_at":"2022-03-01T17:01:37.782+08:00","updated_at":"2022-03-01T17:01:37.782+08:00"},{"id":7613921,"file_name":"fly_blue.png","project_id":325949,"asset_id":481628,"created_at":"2022-03-01T17:01:37.786+08:00","updated_at":"2022-03-01T17:01:37.786+08:00"},{"id":7613922,"file_name":"fly_red.png","project_id":325949,"asset_id":481629,"created_at":"2022-03-01T17:01:37.790+08:00","updated_at":"2022-03-01T17:01:37.790+08:00"},{"id":7613923,"file_name":"info.png","project_id":325949,"asset_id":481630,"created_at":"2022-03-01T17:01:37.795+08:00","updated_at":"2022-03-01T17:01:37.795+08:00"},{"id":7613924,"file_name":"frog_r_1.png","project_id":325949,"asset_id":481631,"created_at":"2022-03-01T17:01:37.799+08:00","updated_at":"2022-03-01T17:01:37.799+08:00"},{"id":7613925,"file_name":"frog_r_0.png","project_id":325949,"asset_id":481632,"created_at":"2022-03-01T17:01:37.803+08:00","updated_at":"2022-03-01T17:01:37.803+08:00"},{"id":7613926,"file_name":"frog_b_1.png","project_id":325949,"asset_id":481633,"created_at":"2022-03-01T17:01:37.807+08:00","updated_at":"2022-03-01T17:01:37.807+08:00"},{"id":7613927,"file_name":"frog_b_0.png","project_id":325949,"asset_id":481634,"created_at":"2022-03-01T17:01:37.811+08:00","updated_at":"2022-03-01T17:01:37.811+08:00"},{"id":7613928,"file_name":"board.png","project_id":325949,"asset_id":481635,"created_at":"2022-03-01T17:01:37.815+08:00","updated_at":"2022-03-01T17:01:37.815+08:00"},{"id":7613929,"file_name":"bg.png","project_id":325949,"asset_id":481636,"created_at":"2022-03-01T17:01:37.820+08:00","updated_at":"2022-03-01T17:01:37.820+08:00"},{"id":7613930,"file_name":"bgm.mp3","project_id":325949,"asset_id":481637,"created_at":"2022-03-01T17:01:37.834+08:00","updated_at":"2022-03-01T17:01:37.834+08:00"},{"id":7613931,"file_name":"shoot.mp3","project_id":325949,"asset_id":481638,"created_at":"2022-03-01T17:01:37.838+08:00","updated_at":"2022-03-01T17:01:59.848+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦