{"id":341635,"student_id":3325,"content":"import game;\ngame.set_backdrop(\"bg.png\"); #設定背景\nball = game.create_sprite(\"ball.png\"); #創造角色\ninfo = game.create_sprite(\"info.png\");\nshadow = game.create_sprite(\"shadow.png\");\n\nvx = 15\nvy = 15\nscore = 0\nbest = 0\n\ngame.create_sound(\"bgm.mp3\",True);\ndef loop():\n \n game.draw_text(score, 110, 80, 'white',50) \n game.draw_text(best, 1050, 80, 'white',50) \n if cursor. is_down:\n info.hidden = True\n if info.hidden == True:\n global vx,vy,score,best\n ball.x = ball.x + vx;\n ball.y = ball.y + vy;\n vx=vx + 0.01\n vy=vy + 0.01\n if ball.x \u003c 100 and vx \u003c 0 :\n vx = -vx*0.75\n if ball.x \u003e 1100 and vx \u003e 0: \n vx = -vx*0.75\n if ball.y \u003c 100 and vy \u003c 0:\n vy = -vy*0.81\n if ball.y \u003e 750 and vy \u003e 0:\n vx = -vx*0.75\n vy = -vy*0.81\n score = 0\n if ball.touched(cursor): \n vx=(ball.x - cursor.x)/4\n vy=(ball.y - cursor.y)/4.2\n score = score + 1\n game.create_sound(\"bounce.mp3\");\n if score \u003e best:\n best = score\n shadow.x = ball.x \n shadow.y = 850\n shadow.scale = ball.y / 375\n \n \n \ngame.forever(loop) #重複不斷執行)","created_at":"2022-01-28T20:14:59.155+08:00","updated_at":"2022-03-27T10:09:52.857+08:00","name":"排球之王(預設版) 副本","language":"python","screenshot":{"url":"https://cdn1.koding.school/uploads/project/screenshot/341635/d5d8d90c50346241ad10934a3bdaf682.jpg"},"parent_id":194469,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":119,"hashid":"qmds856jd","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":7330923,"file_name":"bgm.mp3","project_id":341635,"asset_id":267832,"created_at":"2022-01-28T20:14:59.160+08:00","updated_at":"2022-01-28T20:14:59.160+08:00"},{"id":7330924,"file_name":"bounce.mp3","project_id":341635,"asset_id":267833,"created_at":"2022-01-28T20:14:59.161+08:00","updated_at":"2022-01-28T20:14:59.161+08:00"},{"id":7330925,"file_name":"bg.png","project_id":341635,"asset_id":267834,"created_at":"2022-01-28T20:14:59.162+08:00","updated_at":"2022-01-28T20:14:59.162+08:00"},{"id":7330926,"file_name":"ball.png","project_id":341635,"asset_id":267835,"created_at":"2022-01-28T20:14:59.175+08:00","updated_at":"2022-01-28T20:14:59.175+08:00"},{"id":7330927,"file_name":"shadow.png","project_id":341635,"asset_id":267836,"created_at":"2022-01-28T20:14:59.176+08:00","updated_at":"2022-01-28T20:14:59.176+08:00"},{"id":7330928,"file_name":"info.png","project_id":341635,"asset_id":267837,"created_at":"2022-01-28T20:14:59.177+08:00","updated_at":"2022-01-28T20:14:59.177+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
繁中
简中
English
日本語
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦