{"id":1054999,"student_id":2589,"content":"import game\nimport random\n\n\ngame.set_backdrop('bg.png')\np1 = game.create_sprite('pipes.png')\np2 = game.create_sprite('pipes.png')\np3 = game.create_sprite('pipes.png')\ngd = game.create_sprite('ground.png')\nbird = game.create_sprite('bird_0.png', 'bird_1.png')\nhint = game.create_sprite('hint.png')\nend = game.create_sprite('gameover.png')\n\nend.hidden = True\n\nspeed = 0\nscore = 0\nstart = False\n\np1.x = 0\np2.x = 500\np3.x = 1000\n\n\ndef loop():\n move_ground()\n move_pipes(p1)\n move_pipes(p2)\n move_pipes(p3)\n move_bird()\n game.draw_text(score, 30, 30, 'white', 60)\n\n\ndef move_ground():\n gd.x = gd.x - 6\n\n if gd.x \u003c 0:\n gd.x = gd.x + 1200\n\n\ndef move_pipes(pipe):\n global score\n\n pipe.x = pipe.x - 6\n\n if pipe.x \u003c -100:\n pipe.x = pipe.x + 1500\n if start == True:\n pipe.y = random.randrange(150, 650)\n score = score + 1\n\n\ndef move_bird():\n global speed\n\n if start == True:\n speed = speed + 0.6\n bird.y = bird.y + speed\n\n if speed \u003e 0:\n bird.costume_id = 1\n\n if speed \u003c 0:\n bird.costume_id = 0\n\n\ndef jump():\n global speed, start\n\n speed = -12\n start = True\n hint.hidden = True\n game.create_sound('jump.mp3')\n\n\ndef game_over(t):\n game.stop()\n end.hidden = False\n game.create_sound('gg.mp3')\n\n\ngame.forever(loop)\ngame.on('keydown', jump)\nbird.on('touch', [p1, p2, p3, gd], game_over)\n\ngame.create_sound('bgm.mp3', True)\n","created_at":"2025-07-08T21:38:56.652+08:00","updated_at":"2025-07-08T22:30:39.923+08:00","name":"ジャンプパード","language":"python","screenshot":{"url":"https://cdn3.koding.school/uploads/project/screenshot/1054999/f77196cd7b2fdf89065d34ab2f53921c.jpg"},"parent_id":1025066,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":48,"hashid":"d5msq256v","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":39551360,"file_name":"gameover.png","project_id":1054999,"asset_id":189062,"created_at":"2025-07-08T21:38:56.658+08:00","updated_at":"2025-07-08T21:38:56.658+08:00"},{"id":39551361,"file_name":"ground.png","project_id":1054999,"asset_id":189063,"created_at":"2025-07-08T21:38:56.664+08:00","updated_at":"2025-07-08T21:38:56.664+08:00"},{"id":39551362,"file_name":"pipes.png","project_id":1054999,"asset_id":202594,"created_at":"2025-07-08T21:38:56.665+08:00","updated_at":"2025-07-08T21:38:56.665+08:00"},{"id":39551363,"file_name":"hint.png","project_id":1054999,"asset_id":832360,"created_at":"2025-07-08T21:38:56.666+08:00","updated_at":"2025-07-08T21:38:56.666+08:00"},{"id":39551364,"file_name":"bird_0.png","project_id":1054999,"asset_id":189061,"created_at":"2025-07-08T21:38:56.666+08:00","updated_at":"2025-07-08T21:38:56.666+08:00"},{"id":39551365,"file_name":"bird_1.png","project_id":1054999,"asset_id":189060,"created_at":"2025-07-08T21:38:56.667+08:00","updated_at":"2025-07-08T21:38:56.667+08:00"},{"id":39551366,"file_name":"bgm.mp3","project_id":1054999,"asset_id":172841,"created_at":"2025-07-08T21:38:56.668+08:00","updated_at":"2025-07-08T21:38:56.668+08:00"},{"id":39551367,"file_name":"jump.mp3","project_id":1054999,"asset_id":201868,"created_at":"2025-07-08T21:38:56.669+08:00","updated_at":"2025-07-08T21:38:56.669+08:00"},{"id":39551368,"file_name":"gg.mp3","project_id":1054999,"asset_id":202597,"created_at":"2025-07-08T21:38:56.670+08:00","updated_at":"2025-07-08T21:38:56.670+08:00"},{"id":39551369,"file_name":"bg.png","project_id":1054999,"asset_id":189059,"created_at":"2025-07-08T21:38:56.671+08:00","updated_at":"2025-07-08T21:38:56.671+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
繁中
简中
English
日本語
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦