{"id":1023741,"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')\nb2 = game.create_sprite('0.png')\nb3 = game.create_sprite('0.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.2\n b2.x = b2.x - velocity_x * 1.2\n b3.x = b3.x - velocity_x * 1.2\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)\n\n if b2.x \u003c -100:\n b2.x = b2.x + b1.x + random.randrange(400, 1000)\n\n if b3.x \u003c -100:\n b3.x = b3.x + b2.x + random.randrange(400, 1000)\n\n\ngame.forever(loop)\n","created_at":"2025-05-29T10:13:23.988+08:00","updated_at":"2025-05-29T10:14:37.071+08:00","name":"5_A_D_小恐龍大爆走_正課_【講解】障礙物之間的隨機距離 副本","language":"python","screenshot":{"url":null},"parent_id":1023740,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":47,"hashid":"882see2v9","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":38685016,"file_name":"jump.ogg","project_id":1023741,"asset_id":267853,"created_at":"2025-05-29T10:13:23.994+08:00","updated_at":"2025-05-29T10:13:23.994+08:00"},{"id":38685017,"file_name":"milestone.mp3","project_id":1023741,"asset_id":267854,"created_at":"2025-05-29T10:13:23.995+08:00","updated_at":"2025-05-29T10:13:23.995+08:00"},{"id":38685018,"file_name":"bgm.mp3","project_id":1023741,"asset_id":267855,"created_at":"2025-05-29T10:13:23.996+08:00","updated_at":"2025-05-29T10:13:23.996+08:00"},{"id":38685019,"file_name":"0.png","project_id":1023741,"asset_id":267856,"created_at":"2025-05-29T10:13:23.997+08:00","updated_at":"2025-05-29T10:13:23.997+08:00"},{"id":38685020,"file_name":"2.png","project_id":1023741,"asset_id":267857,"created_at":"2025-05-29T10:13:23.998+08:00","updated_at":"2025-05-29T10:13:23.998+08:00"},{"id":38685021,"file_name":"3.png","project_id":1023741,"asset_id":267858,"created_at":"2025-05-29T10:13:23.999+08:00","updated_at":"2025-05-29T10:13:23.999+08:00"},{"id":38685022,"file_name":"4.png","project_id":1023741,"asset_id":267859,"created_at":"2025-05-29T10:13:24.000+08:00","updated_at":"2025-05-29T10:13:24.000+08:00"},{"id":38685023,"file_name":"sky_dark.png","project_id":1023741,"asset_id":267860,"created_at":"2025-05-29T10:13:24.001+08:00","updated_at":"2025-05-29T10:13:24.001+08:00"},{"id":38685024,"file_name":"board.png","project_id":1023741,"asset_id":267861,"created_at":"2025-05-29T10:13:24.003+08:00","updated_at":"2025-05-29T10:13:24.003+08:00"},{"id":38685025,"file_name":"dino_0.png","project_id":1023741,"asset_id":267862,"created_at":"2025-05-29T10:13:24.004+08:00","updated_at":"2025-05-29T10:13:24.004+08:00"},{"id":38685026,"file_name":"dino_1.png","project_id":1023741,"asset_id":267863,"created_at":"2025-05-29T10:13:24.005+08:00","updated_at":"2025-05-29T10:13:24.005+08:00"},{"id":38685027,"file_name":"hint.png","project_id":1023741,"asset_id":267864,"created_at":"2025-05-29T10:13:24.006+08:00","updated_at":"2025-05-29T10:13:24.006+08:00"},{"id":38685028,"file_name":"bg.png","project_id":1023741,"asset_id":267865,"created_at":"2025-05-29T10:13:24.007+08:00","updated_at":"2025-05-29T10:13:24.007+08:00"},{"id":38685029,"file_name":"sky_light.png","project_id":1023741,"asset_id":267866,"created_at":"2025-05-29T10:13:24.008+08:00","updated_at":"2025-05-29T10:13:24.008+08:00"},{"id":38685030,"file_name":"ground.png","project_id":1023741,"asset_id":267867,"created_at":"2025-05-29T10:13:24.009+08:00","updated_at":"2025-05-29T10:13:24.009+08:00"},{"id":38685031,"file_name":"1.png","project_id":1023741,"asset_id":267868,"created_at":"2025-05-29T10:13:24.010+08:00","updated_at":"2025-05-29T10:13:24.010+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
繁中
简中
English
日本語
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦