{"id":114761,"student_id":10,"content":"var border= createSprite(\"border.png\");\nvar road = createSprite(\"road.png\");\nvar check1 = createSprite(\"check.png\");\nvar check2 = createSprite(\"check.png\");\nvar car = createSprite(\"car.png\");\n\nborder.rotationStyle = 'fixed';\nroad.rotationStyle = 'fixed';\ncheck1.rotationStyle = \"fixed\";\ncheck2.rotationStyle = \"fixed\";\n\nvar board = createSprite('a.png');\nvar pointer = createSprite('b.png');\n\nboard.y += 240;\npointer.y += 240;\ncheck2.y += 1200;\n\nvar speed = 0;\nvar target = 2;\nvar startTime = Date.now();\nvar scores = [];\n\n\nforever(function(){\n print(scores.length + '/3', 10, 10, 'black', 20);\n print(scores, 10, 50, 'black', 20);\n \n if(key.right) {\n car.direction += 3;\n speed -= 0.11;\n }\n if(key.left) {\n car.direction -= 3;\n speed -= 0.11;\n }\n if(speed \u003c 9) {\n speed += 0.08;\n }\n if(car.touched(border)) {\n speed -= 0.13;\n }\n if(speed \u003c 0.3) {\n speed = 0.3; \n }\n if(car.touched(check2) \u0026\u0026 target == 2) {\n target = 1;\n }\n if(car.touched(check1) \u0026\u0026 target == 1) {\n target = 2;\n scores.push((Date.now() - startTime)/1000 + 's');\n startTime = Date.now();\n }\n if(scores.length === 3) {\n stop();\n }\n \n pointer.direction = speed/9*180;\n\n border.direction = car.direction + 180;\n border.stepForward(speed);\n road.direction = car.direction + 180;\n road.stepForward(speed);\n check1.direction = car.direction + 180;\n check1.stepForward(speed);\n check2.direction = car.direction + 180;\n check2.stepForward(speed);\n});","created_at":"2019-12-16T09:33:20.363+08:00","updated_at":"2019-12-16T10:46:53.422+08:00","name":"急速賽車_概念版","language":"javascript","screenshot":{"url":"https://cdn6.koding.school/uploads/project/screenshot/114761/51042e9c7510bd141be57d0c182f1c39.jpg"},"parent_id":2,"plugin":"\n","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":272,"hashid":"gk4srw8d","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":1961698,"file_name":"b.png","project_id":114761,"asset_id":172229,"created_at":"2019-12-16T10:15:13.060+08:00","updated_at":"2019-12-16T10:15:13.060+08:00"},{"id":1961695,"file_name":"a.png","project_id":114761,"asset_id":172227,"created_at":"2019-12-16T10:12:14.990+08:00","updated_at":"2019-12-16T10:12:14.990+08:00"},{"id":1961689,"file_name":"car.png","project_id":114761,"asset_id":172221,"created_at":"2019-12-16T09:33:36.086+08:00","updated_at":"2019-12-16T09:33:36.086+08:00"},{"id":1961692,"file_name":"check.png","project_id":114761,"asset_id":172224,"created_at":"2019-12-16T09:33:36.113+08:00","updated_at":"2019-12-16T09:33:36.113+08:00"},{"id":1961693,"file_name":"border.png","project_id":114761,"asset_id":172225,"created_at":"2019-12-16T09:51:09.067+08:00","updated_at":"2019-12-16T09:51:09.067+08:00"},{"id":1961694,"file_name":"road.png","project_id":114761,"asset_id":172226,"created_at":"2019-12-16T09:51:09.069+08:00","updated_at":"2019-12-16T09:51:09.069+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦