{"id":333803,"student_id":3544,"content":"import game\ngame.set_backdrop(\"bg.png\")\nball =game.create_sprite(\"ball.png\") \nvx=0\nvy=0\nscore=0\nbest=0\ngame.create_sound(\"bgm.mp3\",True)\nshadow=game.create_sprite(\"shadow.png\") #創造角色\ninfo=game.create_sprite(\"info.png\") #創造角色\ndef loop():\n global vx, vy, score, best\n ball.x=ball.x+vx\n ball.y=ball.y+vy\n vy=vy+0.33\n \n if ball.x\u003c100 and vx\u003c0 : vx=-vx \n if ball.x\u003e1100 and vx\u003e0 : vx=-vx \n if ball.y\u003c100 and vy\u003c0 : vy=-vy \n \n if ball.y\u003e800 and vy\u003e0 : \n vy=-vy *0.7 \n vx= vx *0.7\n score=0\n if ball.touched(cursor):\n game.create_sound(\"bounce.mp3\")\n vx=(ball.x- cursor.x)/5\n vy=(ball.y- cursor.y)/5\n score=score+1\n \n if score\u003ebest:\n best=score\n if cursor.is_down:\n info.hidden=True\n shadow.x=ball.x\n shadow.y=850\n shadow.scale=ball.y/750\n game.draw_text(score,110,80,'white',50)\n game.draw_text(best,1050,80,'white',50)\ngame.forever(loop)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","created_at":"2022-01-08T13:58:02.244+08:00","updated_at":"2022-01-08T15:02:23.082+08:00","name":"排球之王(預設版) 副本","language":"python","screenshot":{"url":"https://cdn2.koding.school/uploads/project/screenshot/333803/b230fa3bcc0fafe3f75ee57f07ce202f.jpg"},"parent_id":194469,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":48,"hashid":"36ysmpevz","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":7099425,"file_name":"bgm.mp3","project_id":333803,"asset_id":267832,"created_at":"2022-01-08T13:58:02.249+08:00","updated_at":"2022-01-08T13:58:02.249+08:00"},{"id":7099426,"file_name":"bounce.mp3","project_id":333803,"asset_id":267833,"created_at":"2022-01-08T13:58:02.250+08:00","updated_at":"2022-01-08T13:58:02.250+08:00"},{"id":7099427,"file_name":"bg.png","project_id":333803,"asset_id":267834,"created_at":"2022-01-08T13:58:02.251+08:00","updated_at":"2022-01-08T13:58:02.251+08:00"},{"id":7099428,"file_name":"ball.png","project_id":333803,"asset_id":267835,"created_at":"2022-01-08T13:58:02.252+08:00","updated_at":"2022-01-08T13:58:02.252+08:00"},{"id":7099429,"file_name":"shadow.png","project_id":333803,"asset_id":267836,"created_at":"2022-01-08T13:58:02.252+08:00","updated_at":"2022-01-08T13:58:02.252+08:00"},{"id":7099430,"file_name":"info.png","project_id":333803,"asset_id":267837,"created_at":"2022-01-08T13:58:02.253+08:00","updated_at":"2022-01-08T13:58:02.253+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
繁中
简中
English
日本語
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦