{"id":1061663,"student_id":2589,"content":"import game\n\n\ngame.set_backdrop(\"bg.png\")\nball = game.create_sprite(\"ball.png\")\ninfo = game.create_sprite(\"info.png\")\nshadow = game.create_sprite(\"shadow.png\")\ngame.create_sound(\"bgm.mp3\", True)\n\nvx = 0\nvy = 0\nscore = 0\nbest = 0\n\n\ndef loop():\n global vx, vy, score, best\n\n ball.x = ball.x + vx\n ball.y = ball.y + vy\n vy = vy + 0.33\n\n if ball.x \u003c 100 and vx \u003c 0:\n vx = -vx\n \n if ball.x \u003e 1100 and vx \u003e 0:\n vx = -vx\n \n if ball.y \u003c 100 and vy \u003c 0:\n vy = -vy\n \n if ball.y \u003e 750 and vy \u003e 0:\n vy = -vy * 0.7\n vx = vx * 0.7\n score = 0\n\n if ball.touched(cursor):\n vx = (ball.x - cursor.x) / 4\n vy = (ball.y - cursor.y) / 4\n score = score + 1\n \n if score \u003e best:\n best = score\n \n game.create_sound(\"bounce.mp3\")\n\n if cursor.is_down:\n info.hidden = True\n\n shadow.x = ball.x\n shadow.y = 850\n shadow.scale = ball.y / 750\n\n game.draw_text(score, 110, 80, \"white\", 50)\n game.draw_text(best, 1050, 80, \"white\", 50)\n\n\ngame.forever(loop)\n","created_at":"2025-07-14T16:38:20.847+08:00","updated_at":"2025-07-14T16:38:29.625+08:00","name":"Volleyball King","language":"python","screenshot":{"url":null},"parent_id":1061661,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":34,"hashid":"9ygsz92vv","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":39717565,"file_name":"shadow.png","project_id":1061663,"asset_id":832431,"created_at":"2025-07-14T16:38:20.852+08:00","updated_at":"2025-07-14T16:38:20.852+08:00"},{"id":39717566,"file_name":"bounce.mp3","project_id":1061663,"asset_id":262238,"created_at":"2025-07-14T16:38:20.853+08:00","updated_at":"2025-07-14T16:38:20.853+08:00"},{"id":39717567,"file_name":"bgm.mp3","project_id":1061663,"asset_id":262227,"created_at":"2025-07-14T16:38:20.854+08:00","updated_at":"2025-07-14T16:38:20.854+08:00"},{"id":39717568,"file_name":"ball.png","project_id":1061663,"asset_id":260477,"created_at":"2025-07-14T16:38:20.855+08:00","updated_at":"2025-07-14T16:38:20.855+08:00"},{"id":39717569,"file_name":"bg.png","project_id":1061663,"asset_id":832432,"created_at":"2025-07-14T16:38:20.856+08:00","updated_at":"2025-07-14T16:38:20.856+08:00"},{"id":39717570,"file_name":"info.png","project_id":1061663,"asset_id":837217,"created_at":"2025-07-14T16:38:20.857+08:00","updated_at":"2025-07-14T16:38:20.857+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
繁中
简中
English
日本語
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦