{"id":1063470,"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')\nhint = game.create_sprite(\"hint.png\")\n\ngame.create_sound('bgm.mp3', True)\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 if hint.hidden:\n ground.x -= velocity_x\n b1.x -= velocity_x * 1.3\n b2.x -= velocity_x * 1.3\n b3.x -= velocity_x * 1.3\n\n if ground.x \u003c= -1200:\n ground.x += 3000\n\n if b1.x \u003c -100:\n 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 += 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 += b2.x + random.randrange(400, 1000) * velocity_x / 10\n b3.costume_id = random.randrange(5)\n\n dino.y += velocity_y\n velocity_y += 2\n \n if game.key.space and dino.y \u003e= 600:\n velocity_y = -30\n game.create_sound('jump.ogg')\n\n if dino.y \u003e 600:\n dino.y = 600\n\n if (dino.touched(b1) or dino.touched(b2) or dino.touched(b3)):\n hint.hidden = False\n\n if hint.hidden:\n score += 1 / 6\n dino.costume_id = int(score) % 2\n\n game.draw_text(int(score), 10, 10, 'black', 60)\n\n if score % 300 \u003c 150:\n game.set_backdrop('sky_light.png')\n \n else:\n game.set_backdrop('sky_dark.png')\n\n velocity_x = 10 + score / 100\n\n if game.key.enter and hint.hidden == False:\n hint.hidden = True\n b1.x = 2000\n b2.x = 2500\n b3.x = 3000\n score = 0\n\n\ngame.forever(loop)\n","created_at":"2025-07-18T13:53:09.474+08:00","updated_at":"2025-07-18T13:53:19.676+08:00","name":"爆走!ダイナソー","language":"python","screenshot":{"url":null},"parent_id":1063469,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":46,"hashid":"kdmsw35d3","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":39740050,"file_name":"jump.ogg","project_id":1063470,"asset_id":172839,"created_at":"2025-07-18T13:53:09.479+08:00","updated_at":"2025-07-18T13:53:09.479+08:00"},{"id":39740051,"file_name":"1.png","project_id":1063470,"asset_id":832434,"created_at":"2025-07-18T13:53:09.481+08:00","updated_at":"2025-07-18T13:53:09.481+08:00"},{"id":39740052,"file_name":"0.png","project_id":1063470,"asset_id":264883,"created_at":"2025-07-18T13:53:09.481+08:00","updated_at":"2025-07-18T13:53:09.481+08:00"},{"id":39740053,"file_name":"2.png","project_id":1063470,"asset_id":264885,"created_at":"2025-07-18T13:53:09.482+08:00","updated_at":"2025-07-18T13:53:09.482+08:00"},{"id":39740054,"file_name":"bgm.mp3","project_id":1063470,"asset_id":202056,"created_at":"2025-07-18T13:53:09.483+08:00","updated_at":"2025-07-18T13:53:09.483+08:00"},{"id":39740055,"file_name":"milestone.mp3","project_id":1063470,"asset_id":202055,"created_at":"2025-07-18T13:53:09.484+08:00","updated_at":"2025-07-18T13:53:09.484+08:00"},{"id":39740056,"file_name":"3.png","project_id":1063470,"asset_id":264886,"created_at":"2025-07-18T13:53:09.485+08:00","updated_at":"2025-07-18T13:53:09.485+08:00"},{"id":39740057,"file_name":"4.png","project_id":1063470,"asset_id":264887,"created_at":"2025-07-18T13:53:09.486+08:00","updated_at":"2025-07-18T13:53:09.486+08:00"},{"id":39740058,"file_name":"ground.png","project_id":1063470,"asset_id":264582,"created_at":"2025-07-18T13:53:09.487+08:00","updated_at":"2025-07-18T13:53:09.487+08:00"},{"id":39740059,"file_name":"hint.png","project_id":1063470,"asset_id":832437,"created_at":"2025-07-18T13:53:09.488+08:00","updated_at":"2025-07-18T13:53:09.488+08:00"},{"id":39740060,"file_name":"sky_dark.png","project_id":1063470,"asset_id":264888,"created_at":"2025-07-18T13:53:09.489+08:00","updated_at":"2025-07-18T13:53:09.489+08:00"},{"id":39740061,"file_name":"sky_light.png","project_id":1063470,"asset_id":265661,"created_at":"2025-07-18T13:53:09.490+08:00","updated_at":"2025-07-18T13:53:09.490+08:00"},{"id":39740062,"file_name":"bg.png","project_id":1063470,"asset_id":265661,"created_at":"2025-07-18T13:53:09.491+08:00","updated_at":"2025-07-18T13:53:09.491+08:00"},{"id":39740063,"file_name":"board.png","project_id":1063470,"asset_id":264890,"created_at":"2025-07-18T13:53:09.492+08:00","updated_at":"2025-07-18T13:53:09.492+08:00"},{"id":39740064,"file_name":"dino_0.png","project_id":1063470,"asset_id":264891,"created_at":"2025-07-18T13:53:09.493+08:00","updated_at":"2025-07-18T13:53:09.493+08:00"},{"id":39740065,"file_name":"dino_1.png","project_id":1063470,"asset_id":264892,"created_at":"2025-07-18T13:53:09.494+08:00","updated_at":"2025-07-18T13:53:09.494+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
繁中
简中
English
日本語
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦