{"id":160642,"student_id":16,"content":"var bg = createSprite('bg.png'); //背景圖\nvar player = createSprite('player.png'); //潛水艇\nvar hint = createSprite('hint.png'); //提示教學\n\nvar vy = 0; //墜落速度\nvar level = 0; //分數\nvar initY = 450; //當前最新的障礙物座標\nvar isStart = false; //是否開始遊戲\nvar rocks = []; //存放障礙物\nvar bubbles = []; //存放泡泡\n\nplayer.layer = 1; //設定潛水挺圖層\nhint.scale = 1.5; //設定教學提示圖大小\nhint.hidden = true;\n\nfor (var i = 0; i \u003c 17; i++) {\n var r = createSprite('b0.png');\n r.x = i * 75;\n rocks.push(r);\n}\nfor (var i = 0; i \u003c 21; i++) {\n var b = createSprite('bubble.png');\n b.x = i * 30;\n bubbles.push(b);\n}\n\n\nforever(loop); //重複不斷執行遊戲回圈\n\n//遊戲主迴圈\nfunction loop () {\n for(var i = 0; i \u003c 17; i++) {\n var r = rocks[i];\n r.x -= 8;\n if(r.x \u003c -30) {\n r.x += 1275;\n initY += Math.random() * 120 - 60;\n if(initY \u003c 300) {\n initY = 300;\n }\n if(initY \u003e 600) {\n initY = 600;\n }\n r.y = initY;\n }\n }\n for(var i = 0; i \u003c 21; i++) {\n var b = bubbles[i];\n b.x -= 7;\n b.y -= 2;\n b.scale = b.x / 600;\n b.opacity = b.x / 600;\n if(b.x \u003c -10) {\n b.x = player.x - 60 - Math.random() * 20;\n b.y = player.y + Math.random() * 20;\n }\n }\n}\n","created_at":"2020-06-30T19:32:35.017+08:00","updated_at":"2020-06-30T23:15:46.480+08:00","name":"海底探險 副本","language":"javascript","screenshot":{"url":"https://cdn6.koding.school/uploads/project/screenshot/160642/7eff36717469a8bcfbe1b868c5af73a4.jpg"},"parent_id":136468,"plugin":"Game.set({width: 1200, height: 900})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":69,"hashid":"9ygsmgz2","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2794450,"file_name":"level.wav","project_id":160642,"asset_id":230826,"created_at":"2020-06-30T19:32:35.024+08:00","updated_at":"2020-06-30T19:32:35.024+08:00"},{"id":2794451,"file_name":"bg.png","project_id":160642,"asset_id":201852,"created_at":"2020-06-30T19:32:35.027+08:00","updated_at":"2020-06-30T19:32:35.027+08:00"},{"id":2794452,"file_name":"b10.png","project_id":160642,"asset_id":200379,"created_at":"2020-06-30T19:32:35.028+08:00","updated_at":"2020-06-30T19:32:35.028+08:00"},{"id":2794453,"file_name":"b9.png","project_id":160642,"asset_id":200378,"created_at":"2020-06-30T19:32:35.030+08:00","updated_at":"2020-06-30T19:32:35.030+08:00"},{"id":2794454,"file_name":"b8.png","project_id":160642,"asset_id":200377,"created_at":"2020-06-30T19:32:35.031+08:00","updated_at":"2020-06-30T19:32:35.031+08:00"},{"id":2794455,"file_name":"b7.png","project_id":160642,"asset_id":200376,"created_at":"2020-06-30T19:32:35.032+08:00","updated_at":"2020-06-30T19:32:35.032+08:00"},{"id":2794456,"file_name":"b6.png","project_id":160642,"asset_id":200375,"created_at":"2020-06-30T19:32:35.033+08:00","updated_at":"2020-06-30T19:32:35.033+08:00"},{"id":2794457,"file_name":"b5.png","project_id":160642,"asset_id":200374,"created_at":"2020-06-30T19:32:35.034+08:00","updated_at":"2020-06-30T19:32:35.034+08:00"},{"id":2794458,"file_name":"b4.png","project_id":160642,"asset_id":200373,"created_at":"2020-06-30T19:32:35.035+08:00","updated_at":"2020-06-30T19:32:35.035+08:00"},{"id":2794459,"file_name":"b3.png","project_id":160642,"asset_id":200372,"created_at":"2020-06-30T19:32:35.037+08:00","updated_at":"2020-06-30T19:32:35.037+08:00"},{"id":2794460,"file_name":"b2.png","project_id":160642,"asset_id":200371,"created_at":"2020-06-30T19:32:35.038+08:00","updated_at":"2020-06-30T19:32:35.038+08:00"},{"id":2794461,"file_name":"b1.png","project_id":160642,"asset_id":200370,"created_at":"2020-06-30T19:32:35.039+08:00","updated_at":"2020-06-30T19:32:35.039+08:00"},{"id":2794462,"file_name":"b0.png","project_id":160642,"asset_id":200369,"created_at":"2020-06-30T19:32:35.040+08:00","updated_at":"2020-06-30T19:32:35.040+08:00"},{"id":2794463,"file_name":"player.png","project_id":160642,"asset_id":200359,"created_at":"2020-06-30T19:32:35.041+08:00","updated_at":"2020-06-30T19:32:35.041+08:00"},{"id":2794464,"file_name":"bubble.png","project_id":160642,"asset_id":200358,"created_at":"2020-06-30T19:32:35.042+08:00","updated_at":"2020-06-30T19:32:35.042+08:00"},{"id":2794465,"file_name":"bgm.ogg","project_id":160642,"asset_id":170605,"created_at":"2020-06-30T19:32:35.043+08:00","updated_at":"2020-06-30T19:32:35.043+08:00"},{"id":2794466,"file_name":"bgm_3.ogg","project_id":160642,"asset_id":170604,"created_at":"2020-06-30T19:32:35.045+08:00","updated_at":"2020-06-30T19:32:35.045+08:00"},{"id":2794467,"file_name":"hint.png","project_id":160642,"asset_id":189068,"created_at":"2020-06-30T19:32:35.046+08:00","updated_at":"2020-06-30T19:32:35.046+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦