{"id":71809,"student_id":1443,"content":"var speed = 0;\nvar round = 0;\nvar target = 2;\nvar startTime = Date.now();\nvar pastime = 0\nforever(function() {\n pastime = (Date.now() - startTime) / 1000\n print(pastime + \"秒\", 10, 10, \"red\", 20)\n print(Math.floor(speed * 10) + 'km/hr', 10, 50, 'red', 20)\n print(round + \" /3\", 10, 90, \"red\", 20)\n playerControl()\n move()\n speedControl()\n flag()\n\n})\nfunction playerControl() {\n\n if (key.left) {\n car.direction -= 3\n }\n\n if (key.right) {\n car.direction += 3\n }}\nfunction move() {\n border.direction = car.direction - 180\n border.stepForward(speed);\n\n road.direction = car.direction - 180\n road.stepForward(speed);\n\n check1.direction = car.direction - 180\n check1.stepForward(speed);\n\n check2.direction = car.direction - 180\n check2.stepForward(speed);\n}\n\nfunction speedControl() {\n if (speed \u003c 9) {\n speed += 0.08\n\n\n }\n if (car.touched(border)) {\n speed -= 0.13\n\n\n }\n if (speed \u003c 0.3) {\n speed = 0.3\n }}\nfunction flag() {\n if (target == 1 \u0026\u0026 car.touched(check1)) {\n target = 2\n round += 1\n }\n if (target == 1 \u0026\u0026 car.touched(check2)) {\n target = 1\n }\n if (round == 1) {\n stop()\n }\n\n}","created_at":"2019-06-13T14:15:38.705+08:00","updated_at":"2022-12-26T20:09:14.447+08:00","name":"急速賽車 副本","language":"javascript","screenshot":{"url":"https://cdn2.koding.school/uploads/project/screenshot/71809/a5883737e2e16dc77762c5b61fe88bb9.jpg"},"parent_id":9146,"plugin":"var road = createSprite(\"road.png\");\nroad.rotationStyle = 'fixed';\nvar check1 = createSprite(\"check.png\");\ncheck1.x = -1200;\ncheck1.y = -400;\ncheck1.rotationStyle = \"fixed\";\nvar check2 = createSprite(\"check.png\");\ncheck2.x = 1130;\ncheck2.y = 300;\ncheck2.rotationStyle = \"fixed\";\nvar border= createSprite(\"border.png\");\nborder.rotationStyle = 'fixed';\nvar car = createSprite(\"car.png\");\ncar.scale = 0.4;\ncar.direction = 180;\n\nvar offsetX = 1500;\nvar offsetY = 650;\n\nroad.x += offsetX;\nroad.y += offsetY;\nborder.x += offsetX;\nborder.y += offsetY;\ncheck1.x += offsetX;\ncheck1.y += offsetY;\ncheck2.x += offsetX;\ncheck2.y += offsetY;","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":99,"hashid":"36ysrp83","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":1254190,"file_name":"car.png","project_id":71809,"asset_id":24181,"created_at":"2019-06-13T14:15:38.710+08:00","updated_at":"2019-06-13T14:15:38.710+08:00"},{"id":1254191,"file_name":"border.png","project_id":71809,"asset_id":24182,"created_at":"2019-06-13T14:15:38.711+08:00","updated_at":"2019-06-13T14:15:38.711+08:00"},{"id":1254192,"file_name":"road.png","project_id":71809,"asset_id":24183,"created_at":"2019-06-13T14:15:38.713+08:00","updated_at":"2019-06-13T14:15:38.713+08:00"},{"id":1254193,"file_name":"check.png","project_id":71809,"asset_id":24184,"created_at":"2019-06-13T14:15:38.714+08:00","updated_at":"2019-06-13T14:15:38.714+08:00"},{"id":11830981,"file_name":"1.png","project_id":71809,"asset_id":618477,"created_at":"2023-04-16T11:24:56.800+08:00","updated_at":"2023-04-16T11:25:06.978+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦