{"id":7971,"student_id":1473,"content":"setBackdrop(\"#ffffff\");\nvar koding = createSprite({\n \tx: 320,\n \ty: 450,\n scale: 0.2,\n\tcostumes: \"1.svg\",\n});\nvar score=0;\nkoding.v=0;\nkoding.rotationStyle=\"flipped\";\nkoding.play=0;\nvar bells=[];\nfor(var i=0;i\u003c4;i++){\n var bell=createSprite(\"bell.png\");\n bell.x=Math.random()*440+100;\n bell.y=50+i*100;\n bell.scale=0.125;\n bells.push(bell);\n}\nforever(function(){\n koding.toward(cursor);\n if(koding.direction\u003c180\u0026\u0026cursor.x-koding.x\u003e10){\n koding.x+=10;\n }\n if(koding.direction\u003e=180\u0026\u0026koding.x-cursor.x\u003e10){\n koding.x-=10;\n }\n if(bells[bells.length-1].y\u003e=80){\n var bell=createSprite(\"bell.png\");\n bell.x=Math.random()*440+100;\n bell.y=-20;\n bell.scale=0.125;\n bells.push(bell);\n }\n koding.v+=0.5;\n if(koding.play==0){\n koding.y+=koding.v;\n if(koding.y\u003e450){\n koding.v=0;\n koding.y=450;\n }\n }else if(koding.play==1){\n for(var i=0;i\u003cbells.length;i++){\n bells[i].y-=koding.v;\n if(bells[i].y\u003e=600){\n bells[i].destroy();\n bells.splice(i,1);\n i--;\n }\n }\n }else{\n koding.y+=koding.v;\n if(koding.y\u003e550){\n print(\"Game over!\",160,200,\"bla\",60);\n stop();\n }\n }\n print(score,20,20,\"black\");\n if(koding.play==1\u0026\u0026bells[0].y\u003ckoding.y-300\u0026\u0026koding.v\u003e0){\n koding.play=2;\n }\n});\nwhen(\"click\",function () {\n if(koding.play==0){\n koding.v=-15;\n }\n});\nkoding.when('touch',bells,function(bell) {\n if(koding.play==0){\n koding.play=1;\n }\n score++;\n bell.destroy();\n bells.splice(bells.indexOf(bell),1);\n koding.v=-15;\n});","created_at":"2017-03-01T20:52:04.729+08:00","updated_at":"2019-11-11T11:07:37.108+08:00","name":"叩叮跳鈴鐺","language":"javascript","screenshot":{"url":"https://cdn9.koding.school/uploads/project/screenshot/7971/dc94666e72ab19cfb701330d14e7954b.jpg"},"parent_id":2,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[1836,1874],"is_featured":false,"views":626,"hashid":"zpeswj6","is_content_changed":null,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":175636,"file_name":"1.svg","project_id":7971,"asset_id":7,"created_at":"2017-07-21T13:04:18.136+08:00","updated_at":"2017-07-21T13:04:18.136+08:00"},{"id":175641,"file_name":"bell.png","project_id":7971,"asset_id":21447,"created_at":"2017-07-21T13:21:42.685+08:00","updated_at":"2017-07-21T13:21:42.685+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦