{"id":113165,"student_id":10,"content":"setBackdrop('#111');\nvar player = createSprite('player.png');\nvar hint = createSprite('hint.png');\nvar vy = 0;\nvar level = 0;\nvar initY = 450;\nvar isStart = false;\nvar rocks = [];\nvar bubbles = [];\n\nplayer.layer = 1;\n\nsound.play('bgm.ogg', true);\n\nfor (var i = 0; i \u003c 21; i++) {\n var r = createSprite(['r11.png', 'r2.png', 'r3.png', 'r4.png', 'r5.png', 'r6.png', 'r7.png', 'r8.png', 'r9.png']);\n r.x = i*60;\n rocks.push(r);\n}\nfor (var i = 0; i \u003c 21; i++) {\n var b = createSprite('bubblee.png');\n b.x = i*30;\n bubbles.push(b);\n}\n\nforever(loop);\n\nfunction loop () {\n for (var i = 0; i \u003c 21; i++) {\n var r = rocks[i];\n r.x -= 8;\n if (r.x \u003c -30) {\n r.x += 1260;\n if (isStart) {\n initY += Math.random()*120 - 60;\n }\n if (initY \u003c 300) {\n initY = 300;\n }\n if (initY \u003e 600) {\n initY = 600;\n }\n r.y = initY;\n\n if (level \u003c 100) {\n r.costumeId = 0;\n } else if (level \u003c 200) {\n r.costumeId = 1;\n } else if (level \u003c 300) {\n r.costumeId = 2;\n } else if (level \u003c 400) {\n r.costumeId = 3;\n } else if (level \u003c 500) {\n r.costumeId = 4;\n } else if (level \u003c 600) {\n r.costumeId = 5;\n } else if (level \u003c 700) {\n r.costumeId = 6;\n } else if (level \u003c 800) {\n r.costumeId = 7;\n } else {\n r.costumeId = 8;\n }\n if (isStart) {\n level++;\n }\n }\n }\n if (key.space) {\n vy -= 0.6;\n isStart = true;\n }\n if (isStart) {\n vy += 0.3;\n player.y += vy;\n player.direction = 90 + vy*2;\n hint.hidden = true;\n }\n if (player.touched(rocks)) {\n stop();\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 - Math.random()*20;\n b.y = player.y + Math.random()*20;\n }\n }\n \n print(level + 'm', 10, 10, 'white', 60);\n}","created_at":"2019-12-11T11:16:37.839+08:00","updated_at":"2020-04-27T20:38:20.949+08:00","name":"海底探險_概念版(完整版)","language":"javascript","screenshot":{"url":"https://cdn3.koding.school/uploads/project/screenshot/113165/a0a46c9cb208b3a4b5683ad53d05bb74.jpg"},"parent_id":2,"plugin":"Game.set({width: 1200, height: 900})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":256,"hashid":"2pdsepen","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":1933638,"file_name":"bgm.ogg","project_id":113165,"asset_id":170605,"created_at":"2019-12-12T12:29:40.430+08:00","updated_at":"2020-03-23T11:05:44.266+08:00"},{"id":1933637,"file_name":"bgm_3.ogg","project_id":113165,"asset_id":170604,"created_at":"2019-12-12T12:29:40.428+08:00","updated_at":"2019-12-12T14:40:49.715+08:00"},{"id":2343600,"file_name":"r9.png","project_id":113165,"asset_id":199805,"created_at":"2020-03-23T11:43:40.246+08:00","updated_at":"2020-03-23T12:34:36.292+08:00"},{"id":2343599,"file_name":"r8.png","project_id":113165,"asset_id":199804,"created_at":"2020-03-23T11:43:39.485+08:00","updated_at":"2020-03-23T12:34:38.659+08:00"},{"id":2343598,"file_name":"r7.png","project_id":113165,"asset_id":199803,"created_at":"2020-03-23T11:43:39.482+08:00","updated_at":"2020-03-23T12:34:40.943+08:00"},{"id":2343597,"file_name":"r6.png","project_id":113165,"asset_id":199802,"created_at":"2020-03-23T11:43:38.292+08:00","updated_at":"2020-03-23T12:34:43.389+08:00"},{"id":2343596,"file_name":"r5.png","project_id":113165,"asset_id":199801,"created_at":"2020-03-23T11:43:38.289+08:00","updated_at":"2020-03-23T12:34:45.815+08:00"},{"id":2343520,"file_name":"hint.png","project_id":113165,"asset_id":189068,"created_at":"2020-03-23T10:30:38.935+08:00","updated_at":"2020-03-23T10:30:38.935+08:00"},{"id":2343604,"file_name":"bubblee.png","project_id":113165,"asset_id":199808,"created_at":"2020-03-23T11:54:23.385+08:00","updated_at":"2020-03-23T11:54:23.385+08:00"},{"id":2343595,"file_name":"r4.png","project_id":113165,"asset_id":199800,"created_at":"2020-03-23T11:43:37.102+08:00","updated_at":"2020-03-23T12:34:48.339+08:00"},{"id":2343594,"file_name":"r3.png","project_id":113165,"asset_id":199799,"created_at":"2020-03-23T11:43:37.100+08:00","updated_at":"2020-03-23T12:34:50.613+08:00"},{"id":2343593,"file_name":"r2.png","project_id":113165,"asset_id":199798,"created_at":"2020-03-23T11:43:35.599+08:00","updated_at":"2020-03-23T12:34:53.404+08:00"},{"id":2343592,"file_name":"r11.png","project_id":113165,"asset_id":199797,"created_at":"2020-03-23T11:43:35.598+08:00","updated_at":"2020-03-23T12:35:01.986+08:00"},{"id":2343581,"file_name":"player.png","project_id":113165,"asset_id":199786,"created_at":"2020-03-23T11:27:15.615+08:00","updated_at":"2020-03-23T11:27:15.615+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦