{"id":497929,"student_id":58026,"content":"import game #載入遊戲套件\ngame.set_backdrop('bg.png') #設定背景圖\nball = game.create_sprite('ball.png') #球\nscore = 0\nvx = 0\nvy = 0\nbast = 0\n#遊戲迴圈\ndef loop ():\n global vx, vy, score, bast\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: vx= -vx\n\n if ball.x \u003e 1100 and vx \u003e 0: vx= -vx\n\n if ball.y \u003c 100 and vy \u003c 0: vy= -vy\n\n if ball.y \u003e 800 and vy \u003e 0:\n vy= -vy * 0.7\n vx= vx * 0.7\n \"x\": 0 \n \"y\": 0 # y座標,\n \"scale\": 1.2, #1.2倍大\n \"costumes\": [\"a.png\"]\n score = 0\n \n game.draw_text(score, 110, 80, \"white\", 50)\n game.draw_text(bast, 1050, 80, \"white\", 50) \n if ball.touched(cursor):\n vx = (ball.x - cursor.x) / 1000000000\n vy = (ball.y - cursor.y) / 1000000000\n score = score + 1\n if score \u003e bast: bast = score\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \ngame.forever(loop) #重複不斷執行遊戲迴圈","created_at":"2023-02-25T10:12:14.030+08:00","updated_at":"2024-08-18T20:56:39.636+08:00","name":"排球之王(預設版) 副本","language":"python","screenshot":{"url":"https://cdn3.koding.school/uploads/project/screenshot/497929/1a8751143ccad470d05353353d0c5c28.jpg"},"parent_id":194469,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":11,"hashid":"6rps2k59v","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":11308576,"file_name":"bgm.mp3","project_id":497929,"asset_id":267832,"created_at":"2023-02-25T10:12:14.036+08:00","updated_at":"2023-02-25T10:12:14.036+08:00"},{"id":11308577,"file_name":"bounce.mp3","project_id":497929,"asset_id":267833,"created_at":"2023-02-25T10:12:14.037+08:00","updated_at":"2023-02-25T10:12:14.037+08:00"},{"id":11308578,"file_name":"bg.png","project_id":497929,"asset_id":267834,"created_at":"2023-02-25T10:12:14.039+08:00","updated_at":"2023-02-25T10:12:14.039+08:00"},{"id":11308579,"file_name":"ball.png","project_id":497929,"asset_id":267835,"created_at":"2023-02-25T10:12:14.040+08:00","updated_at":"2023-02-25T10:12:14.040+08:00"},{"id":11308580,"file_name":"shadow.png","project_id":497929,"asset_id":267836,"created_at":"2023-02-25T10:12:14.043+08:00","updated_at":"2023-02-25T10:12:14.043+08:00"},{"id":11308581,"file_name":"info.png","project_id":497929,"asset_id":267837,"created_at":"2023-02-25T10:12:14.044+08:00","updated_at":"2023-02-25T10:12:14.044+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
繁中
简中
English
日本語
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦