{"id":117982,"student_id":10,"content":"let road = createSprite('road.jpg');\nlet player = createSprite('1.png', '2.png');\n\nroad.x += 2000;\nlet vy = 0;\nlet vx = 0;\n\non('keydown', 'space', run);\non('keyup', 'space', jump);\nforever(loop);\n\n\nfunction run () {\n vx += 0.5;\n}\n\nfunction jump () {\n vy = -10;\n}\n\nfunction loop () {\n \n road.x -= vx;\n player.y += vy;\n \n vy += 0.5;\n if (player.y \u003e 240) {\n player.y = 240;\n }\n if (road.x \u003c 320 \u0026\u0026 player.y == 240) {\n player.direction = 180;\n stop();\n }\n \n var d = player.distanceTo(road);\n player.costumeId = Math.floor(d/50) % 2;\n}\n","created_at":"2020-01-02T15:00:04.184+08:00","updated_at":"2020-02-18T16:13:25.477+08:00","name":"跳遠大賽v3","language":"javascript","screenshot":{"url":"https://cdn0.koding.school/uploads/project/screenshot/117982/f0338a829e990f17f544a8076b566e1e.jpg"},"parent_id":2,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":255,"hashid":"5j3spmz8","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2023504,"file_name":"road.jpg","project_id":117982,"asset_id":176441,"created_at":"2020-01-02T18:07:35.062+08:00","updated_at":"2020-01-02T18:07:35.062+08:00"},{"id":2055981,"file_name":"1.png","project_id":117982,"asset_id":176436,"created_at":"2020-01-14T11:00:58.982+08:00","updated_at":"2020-01-14T11:00:58.982+08:00"},{"id":2055982,"file_name":"2.png","project_id":117982,"asset_id":176435,"created_at":"2020-01-14T11:00:58.986+08:00","updated_at":"2020-01-14T11:00:58.986+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦