{"id":138006,"student_id":10,"content":"var bg = createSprite('bg.png');\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 17; i++) {\n var r = createSprite('b0.png', 'b1.png', 'b2.png', 'b3.png', 'b4.png', 'b5.png', 'b6.png', 'b7.png', 'b8.png', 'b9.png', 'b10.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\nforever(loop);\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 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 30) {\n r.costumeId = 0;\n } else if (level \u003c 60) {\n r.costumeId = 1;\n } else if (level \u003c 90) {\n r.costumeId = 2;\n } else if (level \u003c 120) {\n r.costumeId = 3;\n } else if (level \u003c 150) {\n r.costumeId = 4;\n } else if (level \u003c 180) {\n r.costumeId = 5;\n } else if (level \u003c 210) {\n r.costumeId = 6;\n } else if (level \u003c 240) {\n r.costumeId = 7;\n } else if (level \u003c 270) {\n r.costumeId = 8;\n } else if (level \u003c 300) {\n r.costumeId = 9;\n } else {\n r.costumeId = 10;\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 - 60;\n b.y = player.y + Math.random()*20;\n }\n }\n \n bg.x -= 0.3;\n if (bg.x \u003c -1200) {\n bg.x += 2400;\n }\n \n print(level + 'm', 10, 10, 'white', 60);\n}","created_at":"2020-03-28T22:15:39.481+08:00","updated_at":"2020-03-29T14:52:42.251+08:00","name":"海底探險_雙師_素材 v2 深色版本","language":"javascript","screenshot":{"url":"/uploads/project/screenshot/138006/f05523225dfab81ddecc51c57881f8f3.jpg"},"parent_id":136468,"plugin":"Game.set({width: 1200, height: 900})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":458,"hashid":"meys8d3j","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2376982,"file_name":"b10.png","project_id":138006,"asset_id":200379,"created_at":"2020-03-28T22:15:39.488+08:00","updated_at":"2020-03-28T22:15:39.488+08:00"},{"id":2376983,"file_name":"b9.png","project_id":138006,"asset_id":200378,"created_at":"2020-03-28T22:15:39.489+08:00","updated_at":"2020-03-28T22:15:39.489+08:00"},{"id":2376984,"file_name":"b8.png","project_id":138006,"asset_id":200377,"created_at":"2020-03-28T22:15:39.490+08:00","updated_at":"2020-03-28T22:15:39.490+08:00"},{"id":2376985,"file_name":"b7.png","project_id":138006,"asset_id":200376,"created_at":"2020-03-28T22:15:39.490+08:00","updated_at":"2020-03-28T22:15:39.490+08:00"},{"id":2376986,"file_name":"b6.png","project_id":138006,"asset_id":200375,"created_at":"2020-03-28T22:15:39.491+08:00","updated_at":"2020-03-28T22:15:39.491+08:00"},{"id":2376987,"file_name":"b5.png","project_id":138006,"asset_id":200374,"created_at":"2020-03-28T22:15:39.492+08:00","updated_at":"2020-03-28T22:15:39.492+08:00"},{"id":2376988,"file_name":"b4.png","project_id":138006,"asset_id":200373,"created_at":"2020-03-28T22:15:39.493+08:00","updated_at":"2020-03-28T22:15:39.493+08:00"},{"id":2376989,"file_name":"b3.png","project_id":138006,"asset_id":200372,"created_at":"2020-03-28T22:15:39.494+08:00","updated_at":"2020-03-28T22:15:39.494+08:00"},{"id":2376990,"file_name":"b2.png","project_id":138006,"asset_id":200371,"created_at":"2020-03-28T22:15:39.495+08:00","updated_at":"2020-03-28T22:15:39.495+08:00"},{"id":2376991,"file_name":"b1.png","project_id":138006,"asset_id":200370,"created_at":"2020-03-28T22:15:39.496+08:00","updated_at":"2020-03-28T22:15:39.496+08:00"},{"id":2376992,"file_name":"b0.png","project_id":138006,"asset_id":200369,"created_at":"2020-03-28T22:15:39.497+08:00","updated_at":"2020-03-28T22:15:39.497+08:00"},{"id":2376993,"file_name":"player.png","project_id":138006,"asset_id":200359,"created_at":"2020-03-28T22:15:39.497+08:00","updated_at":"2020-03-28T22:15:39.497+08:00"},{"id":2376994,"file_name":"bubble.png","project_id":138006,"asset_id":200358,"created_at":"2020-03-28T22:15:39.498+08:00","updated_at":"2020-03-28T22:15:39.498+08:00"},{"id":2376995,"file_name":"bgm.ogg","project_id":138006,"asset_id":170605,"created_at":"2020-03-28T22:15:39.499+08:00","updated_at":"2020-03-28T22:15:39.499+08:00"},{"id":2376996,"file_name":"bgm_3.ogg","project_id":138006,"asset_id":170604,"created_at":"2020-03-28T22:15:39.501+08:00","updated_at":"2020-03-28T22:15:39.501+08:00"},{"id":2376997,"file_name":"hint.png","project_id":138006,"asset_id":189068,"created_at":"2020-03-28T22:15:39.502+08:00","updated_at":"2020-03-28T22:15:39.502+08:00"},{"id":2380242,"file_name":"bg.png","project_id":138006,"asset_id":201851,"created_at":"2020-03-29T14:42:05.406+08:00","updated_at":"2020-03-29T14:42:05.406+08:00"}]
Orange Apple Learning Platform
My Projects
View Project Page
Export
Remix
Import
Delete
Download Android APP (APK)
Screenshot
繁中
简中
English
日本語
1:1:1
1:1
Full Width
Scan the QRCode below with your phone to install
Or you can
download APK
to this computer
Scan the QRCode below with your phone to install
Or you can
download APK
to this computer