{"id":200594,"student_id":12205,"content":"alert('賽車遊戲即將開始')\nvar map = createSprite({\n x: 0,\n y:390,\n scale: 20, // 1.2倍大\n costumes: [\"road.png\"]\n})\nsetBackdrop(\"backdrop.png\")\nvar speed = 0;\nvar round = 0;\nvar target = 2;\nvar car =createSprite(\"car.png\")\nvar border =createSprite(\"border.png\")\nvar check1 =createSprite(\"check.png\")\nvar check2 =createSprite(\"check.png\")\nvar car =createSprite(\"car.png\")\nvar road =createSprite(\"road.png\")\nvar startTime = Date.now();\nspeed = 0.3;\nvar passtime = 20\ncar.direction = 0\ncheck1.direction = 180\ncheck2.direction = 180\nroad.direction = 180\nborder.direction = 180\nforever(function() {\n\n //\n if (speed \u003c 1) {\n speed = 1\n }\n passtime = (Date.now()-startTime)/1000;\n print(\"經過時間\"+passtime+\"秒\", 20, 20, \"red\", 20);\n print(Math.floor((speed*10))+\"km/h\", 10, 50, 'red', 30);\n print(round+'/2', 10, 90, 'red', 20);\n\n touched();\n move();\n speedtouched();\n});\nfunction touched() {\n if (key.right) {\n road.direction += 3;\n border.direction += 3;\n check1.direction += 3;\n check2.direction += 3;\n speed -= 0.04\n print(\"正在過彎\", 20, 200, \"red\", 20);\n }\n if (key.left) {\n road.direction -= 3;\n border.direction -= 3;\n check1.direction -= 3;\n check2.direction -= 3;\n speed -= 0.04\n print(\"正在過彎\", 20, 200, \"red\", 20);\n }\n if (key.up) {\n if (speed \u003c 20) {\n speed += 0.08;\n }\n print(\"正在加速\", 20, 250, \"red\", 20);\n } else {\n if (speed \u003c 1) {\n speed = 1\n }\n print(\"已放空油門 \", 20, 350, \"red\", 20);\n speed -= 0.01;\n }\n if (key.down) {\n speed -= 0.1;\n print(\"正在減速 \", 20, 250, \"red\", 20);\n }\n if (key.space) {\n speed = 0.2;\n print(\"已把速度降至最低\", 20, 300, \"red\", 20);\n }\n if (car.touched(border)) {\n if (key.space) {\n speed = 0.2;\n print(\"已把速度降至最低\", 20, 300, \"red\", 20);\n } else {\n speed = 0.000;\n print(\"注意!賽車已衝出道路!\", 20, 150, \"red\", 20);\n }\n }\n}\nfunction move() {\n\n car.direction = border.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\n\n}\nfunction speedtouched() {}\n\nif (speed \u003c 1) {\n speed = 1\n}\n\nfunction end() {\n if (target == 1 \u0026\u0026 car.touched(check1)) {\n target = 2;\n round += 1;\n }\n if (car.touched(check1) \u0026\u0026 target == 1) {\n target = 2\n round += 1\n }\n}","created_at":"2020-10-31T17:38:02.869+08:00","updated_at":"2020-10-31T17:47:19.997+08:00","name":"急速賽車","language":"javascript","screenshot":{"url":"/uploads/project/screenshot/200594/1cdfc9c326edb2f8f5a7a3e99c607829.jpg"},"parent_id":2,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":178,"hashid":"yeysvzk6q","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3455930,"file_name":"backdrop.png","project_id":200594,"asset_id":274805,"created_at":"2020-10-31T17:39:38.104+08:00","updated_at":"2020-10-31T17:39:58.148+08:00"},{"id":3455931,"file_name":"border.png","project_id":200594,"asset_id":24182,"created_at":"2020-10-31T17:40:00.241+08:00","updated_at":"2020-10-31T17:40:07.877+08:00"},{"id":3455933,"file_name":"check.png","project_id":200594,"asset_id":24184,"created_at":"2020-10-31T17:40:26.728+08:00","updated_at":"2020-10-31T17:40:35.262+08:00"},{"id":3455932,"file_name":"road.png","project_id":200594,"asset_id":24183,"created_at":"2020-10-31T17:40:13.368+08:00","updated_at":"2020-10-31T17:40:22.339+08:00"},{"id":3455935,"file_name":"car.png","project_id":200594,"asset_id":24181,"created_at":"2020-10-31T17:40:47.386+08:00","updated_at":"2020-10-31T17:40:54.498+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