{"id":203108,"student_id":3763,"content":"import game\n\ngame.set_backdrop(\"bg.png\") #設定背景\nball = game.create_sprite(\"ball.png\") #創造角色\n\nvx = 0\nvy = 0\nscore = 0\nbest = 0\n\ndef loop():\n global vx,vy,score,best\n ball.x +=vx\n ball.y +=vy\n vy+=0.33\n if ball.x\u003c100 and vx\u003c0:\n vx = -vx\n if ball.x\u003e1100 and vx\u003e0:\n vx = -vx\n if ball.y\u003c100 and vy\u003c0:\n vy = -vy\n if ball.y\u003e800 and vy\u003e0:\n vx = vx*0.7\n vy = -vy*0.7\n score = 0\n \n if ball.touched(cursor):\n vx = (ball.x-cursor.x)/10\n vy = (ball.y-cursor.x)/10\n score +=1\n if score\u003ebest:\n best=score\n \n game.draw_text(score,110,80,'white',60)\n game.draw_text(best,1050,80,'white',60)\n \n\ngame.forever(loop) #重複不斷執行","created_at":"2020-11-13T00:30:45.553+08:00","updated_at":"2020-11-13T00:49:02.393+08:00","name":"排球之王(預設版) 副本","language":"python","screenshot":{"url":"https://cdn2.koding.school/uploads/project/screenshot/203108/54af28cfd7e0fd765e5812cf02d4f19c.jpg"},"parent_id":194469,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":65,"hashid":"5j3s9nkzy","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3508481,"file_name":"info.png","project_id":203108,"asset_id":267837,"created_at":"2020-11-13T00:30:45.558+08:00","updated_at":"2020-11-13T00:30:45.558+08:00"},{"id":3508482,"file_name":"shadow.png","project_id":203108,"asset_id":267836,"created_at":"2020-11-13T00:30:45.559+08:00","updated_at":"2020-11-13T00:30:45.559+08:00"},{"id":3508483,"file_name":"ball.png","project_id":203108,"asset_id":267835,"created_at":"2020-11-13T00:30:45.561+08:00","updated_at":"2020-11-13T00:30:45.561+08:00"},{"id":3508484,"file_name":"bg.png","project_id":203108,"asset_id":267834,"created_at":"2020-11-13T00:30:45.562+08:00","updated_at":"2020-11-13T00:30:45.562+08:00"},{"id":3508485,"file_name":"bounce.mp3","project_id":203108,"asset_id":267833,"created_at":"2020-11-13T00:30:45.563+08:00","updated_at":"2020-11-13T00:30:45.563+08:00"},{"id":3508486,"file_name":"bgm.mp3","project_id":203108,"asset_id":267832,"created_at":"2020-11-13T00:30:45.564+08:00","updated_at":"2020-11-13T00:30:45.564+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
繁中
简中
English
日本語
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦