{"id":1023748,"student_id":2589,"content":"import game\nimport random\n\n\nground = game.create_sprite('ground.png')\ndino = game.create_sprite('dino_0.png', 'dino_1.png')\nb1 = game.create_sprite('0.png', '1.png', '2.png', '3.png', '4.png')\nb2 = game.create_sprite('0.png', '1.png', '2.png', '3.png', '4.png')\nb3 = game.create_sprite('0.png', '1.png', '2.png', '3.png', '4.png')\nboard = game.create_sprite('board.png')\n\ndino.y = 600\nb1.y = 600\nb2.y = 600\nb3.y = 600\n\ndino.x = 300\nb1.x = 2000\nb2.x = 2500\nb3.x = 3000\n\nvelocity_y = 0\nvelocity_x = 10\nscore = 0\n\n\ndef loop():\n global velocity_x, velocity_y, score\n\n ground.x = ground.x - velocity_x\n b1.x = b1.x - velocity_x * 1.3\n b2.x = b2.x - velocity_x * 1.3\n b3.x = b3.x - velocity_x * 1.3\n\n if ground.x \u003c= -1200:\n ground.x = ground.x + 3000\n\n if b1.x \u003c -100:\n b1.x = b1.x + b3.x + random.randrange(400, 1000) * velocity_x / 10\n b1.costume_id = random.randrange(5)\n\n if b2.x \u003c -100:\n b2.x = b2.x + b1.x + random.randrange(400, 1000) * velocity_x / 10\n b2.costume_id = random.randrange(5)\n\n if b3.x \u003c -100:\n b3.x = b3.x + b2.x + random.randrange(400, 1000) * velocity_x / 10\n b3.costume_id = random.randrange(5)\n\n dino.y = dino.y + velocity_y\n velocity_y = velocity_y + 2\n if game.key.space == True and dino.y \u003e= 600:\n velocity_y = -30\n\n if dino.y \u003e 600:\n dino.y = 600\n\n if (dino.touched(b1) == True or\n dino.touched(b2) == True or\n dino.touched(b3) == True):\n game.stop()\n\n score = score + 1 / 6\n game.draw_text(int(score), 10, 10, 'black', 60)\n\n dino.costume_id = int(score) % 2\n\n if score % 300 \u003c 150:\n game.set_backdrop('sky_light.png')\n else:\n game.set_backdrop('sky_dark.png')\n\n velocity_x = 10 + score / 100\n\n\ngame.forever(loop)\n","created_at":"2025-05-29T10:18:44.726+08:00","updated_at":"2025-05-29T10:18:49.427+08:00","name":"5_B_B_小恐龍大爆走_綜合練習_【講解】加快速度 副本","language":"python","screenshot":{"url":null},"parent_id":1011666,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":69,"hashid":"d5msqqk25","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":38685128,"file_name":"jump.ogg","project_id":1023748,"asset_id":267853,"created_at":"2025-05-29T10:18:44.731+08:00","updated_at":"2025-05-29T10:18:44.731+08:00"},{"id":38685129,"file_name":"milestone.mp3","project_id":1023748,"asset_id":267854,"created_at":"2025-05-29T10:18:44.733+08:00","updated_at":"2025-05-29T10:18:44.733+08:00"},{"id":38685130,"file_name":"bgm.mp3","project_id":1023748,"asset_id":267855,"created_at":"2025-05-29T10:18:44.734+08:00","updated_at":"2025-05-29T10:18:44.734+08:00"},{"id":38685131,"file_name":"0.png","project_id":1023748,"asset_id":267856,"created_at":"2025-05-29T10:18:44.734+08:00","updated_at":"2025-05-29T10:18:44.734+08:00"},{"id":38685132,"file_name":"2.png","project_id":1023748,"asset_id":267857,"created_at":"2025-05-29T10:18:44.735+08:00","updated_at":"2025-05-29T10:18:44.735+08:00"},{"id":38685133,"file_name":"3.png","project_id":1023748,"asset_id":267858,"created_at":"2025-05-29T10:18:44.736+08:00","updated_at":"2025-05-29T10:18:44.736+08:00"},{"id":38685134,"file_name":"4.png","project_id":1023748,"asset_id":267859,"created_at":"2025-05-29T10:18:44.737+08:00","updated_at":"2025-05-29T10:18:44.737+08:00"},{"id":38685135,"file_name":"sky_dark.png","project_id":1023748,"asset_id":267860,"created_at":"2025-05-29T10:18:44.738+08:00","updated_at":"2025-05-29T10:18:44.738+08:00"},{"id":38685136,"file_name":"board.png","project_id":1023748,"asset_id":267861,"created_at":"2025-05-29T10:18:44.739+08:00","updated_at":"2025-05-29T10:18:44.739+08:00"},{"id":38685137,"file_name":"dino_0.png","project_id":1023748,"asset_id":267862,"created_at":"2025-05-29T10:18:44.740+08:00","updated_at":"2025-05-29T10:18:44.740+08:00"},{"id":38685138,"file_name":"dino_1.png","project_id":1023748,"asset_id":267863,"created_at":"2025-05-29T10:18:44.741+08:00","updated_at":"2025-05-29T10:18:44.741+08:00"},{"id":38685139,"file_name":"hint.png","project_id":1023748,"asset_id":267864,"created_at":"2025-05-29T10:18:44.742+08:00","updated_at":"2025-05-29T10:18:44.742+08:00"},{"id":38685140,"file_name":"bg.png","project_id":1023748,"asset_id":267865,"created_at":"2025-05-29T10:18:44.743+08:00","updated_at":"2025-05-29T10:18:44.743+08:00"},{"id":38685141,"file_name":"sky_light.png","project_id":1023748,"asset_id":267866,"created_at":"2025-05-29T10:18:44.744+08:00","updated_at":"2025-05-29T10:18:44.744+08:00"},{"id":38685142,"file_name":"ground.png","project_id":1023748,"asset_id":267867,"created_at":"2025-05-29T10:18:44.745+08:00","updated_at":"2025-05-29T10:18:44.745+08:00"},{"id":38685143,"file_name":"1.png","project_id":1023748,"asset_id":267868,"created_at":"2025-05-29T10:18:44.746+08:00","updated_at":"2025-05-29T10:18:44.746+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
繁中
简中
English
日本語
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦