{"id":111891,"student_id":1885,"content":"setBackdrop(\"bg.jpg\");\nvar arrow=createSprite({\n x:320,\n y:240,\n costumes:\"arrow.png\"\n});\nvar redDots=[];\nvar score=0;\n\nfunction makeRedDot(){\n var redDot=createSprite(\"reddot.png\");\n redDot.x=Math.floor(Math.random()*2)*640;\n redDot.y=Math.floor(Math.random()*2)*480;\n redDots.push(redDot);\n}\n\nfunction makeItem(){\n var item=createSprite([\"fire_icon.png\",\"dart_icon.png\",\"canon_icon.png\"]);\n item.costumeId=Math.floor(Math.random()*3);\n item.x=Math.random()*600+20;\n item.y=Math.random()*440+20;\n arrow.when(\"touch\",item,function(target){\n \n if(target.costumeId===0){\n sound.play(\"fire.mp3\");\n var fire=createSprite(\"fire.png\");\n fire.moveTo(target);\n fire.scale=0.5;\n fire.forever(function(){\n this.direction+=this.scale*10;\n this.scale+=0.01;\n if(this.scale\u003e2){\n this.destroy();\n }\n });\n fire.when(\"touch\",redDots,function(dot){\n sound.play(\"hit.mp3\");\n score++;\n dot.destroy();\n \n });\n \n }\n if(target.costumeId==1){\n sound.play(\"dart.mp3\");\n for(var i=0;i\u003c8;i++){\n var dart=createSprite(\"dart.png\");\n dart.moveTo(target);\n dart.direction+=i*45;\n dart.forever(function(){\n this.stepForward(3);\n if(this.x\u003e640||this.x\u003c0||this.y\u003c0||this.y\u003e480){\n this.destroy();\n }\n \n });\n dart.when(\"touch\",redDots,function(dot){\n sound.play(\"hit.mp3\");\n score++;\n dot.destroy();\n });\n }\n }\n if(target.costumeId==2){\n sound.play(\"cannon.mp3\");\n var cannon=createSprite([\"cannon_1.png\",\"cannon_2.png\"]);\n cannon.scale=0.5;\n cannon.chargingTime=100;\n cannon.forever(function(){\n if(this.chargingTime\u003e0){\n this.moveTo(arrow);\n this.direction=arrow.direction;\n this.stepForward(20);\n this.scale+=0.005;\n this.chargingTime--;\n }else{\n this.costumeId=1;\n this.stepForward(10);\n if(this.x\u003e640||this.x\u003c0||this.y\u003c0||this.y\u003e480){\n this.destroy();\n }\n }\n \n });\n cannon.when(\"touch\",redDots,function(dot){\n sound.play(\"hit.mp3\");\n score++;\n dot.destroy();\n });\n } \n \n \n target.destroy();\n });\n}\n\nsetInterval(makeRedDot,1000);\nsetInterval(makeItem,3000);\nsound.play(\"bgm.mp3\");\n \nforever(function(){\n print(\"score:\"+score);\n arrow.toward(cursor);\n var speed=arrow.distanceTo(cursor)/5;\n arrow.stepForward(speed);\n \n if(arrow.touched(redDots)){\n stop();\n }\n \n for(var i=0;i\u003credDots.length;i++){\n redDots[i].toward(arrow);\n redDots[i].stepForward(1);\n }\n});\n\n\n","created_at":"2019-12-07T10:03:42.833+08:00","updated_at":"2019-12-20T19:37:21.608+08:00","name":"tilt to live 副本","language":"javascript","screenshot":{"url":"https://cdn3.koding.school/uploads/project/screenshot/111891/4886531d94f21f8c27a1abe66407be8b.jpg"},"parent_id":20090,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":100,"hashid":"jzms3ev9","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":1908703,"file_name":"dart.mp3","project_id":111891,"asset_id":43933,"created_at":"2019-12-07T10:03:42.841+08:00","updated_at":"2019-12-07T10:03:42.841+08:00"},{"id":1908704,"file_name":"hit.mp3","project_id":111891,"asset_id":43932,"created_at":"2019-12-07T10:03:42.854+08:00","updated_at":"2019-12-07T10:03:42.854+08:00"},{"id":1908705,"file_name":"fire_icon.png","project_id":111891,"asset_id":43931,"created_at":"2019-12-07T10:03:42.859+08:00","updated_at":"2019-12-07T10:03:42.859+08:00"},{"id":1908706,"file_name":"dart_icon.png","project_id":111891,"asset_id":43930,"created_at":"2019-12-07T10:03:42.862+08:00","updated_at":"2019-12-07T10:03:42.862+08:00"},{"id":1908707,"file_name":"canon_icon.png","project_id":111891,"asset_id":43929,"created_at":"2019-12-07T10:03:42.865+08:00","updated_at":"2019-12-07T10:03:42.865+08:00"},{"id":1908708,"file_name":"reddot.png","project_id":111891,"asset_id":43928,"created_at":"2019-12-07T10:03:42.871+08:00","updated_at":"2019-12-07T10:03:42.871+08:00"},{"id":1908709,"file_name":"arrow.png","project_id":111891,"asset_id":43927,"created_at":"2019-12-07T10:03:42.872+08:00","updated_at":"2019-12-07T10:03:42.872+08:00"},{"id":1908710,"file_name":"bg.jpg","project_id":111891,"asset_id":43926,"created_at":"2019-12-07T10:03:42.874+08:00","updated_at":"2019-12-07T10:03:42.874+08:00"},{"id":1908711,"file_name":"cannon_2.png","project_id":111891,"asset_id":43925,"created_at":"2019-12-07T10:03:42.877+08:00","updated_at":"2019-12-07T10:03:42.877+08:00"},{"id":1908712,"file_name":"cannon_1.png","project_id":111891,"asset_id":43924,"created_at":"2019-12-07T10:03:42.882+08:00","updated_at":"2019-12-07T10:03:42.882+08:00"},{"id":1908713,"file_name":"dart.png","project_id":111891,"asset_id":43923,"created_at":"2019-12-07T10:03:42.884+08:00","updated_at":"2019-12-07T10:03:42.884+08:00"},{"id":1908714,"file_name":"fire.png","project_id":111891,"asset_id":43922,"created_at":"2019-12-07T10:03:42.886+08:00","updated_at":"2019-12-07T10:03:42.886+08:00"},{"id":1908715,"file_name":"bgm.mp3","project_id":111891,"asset_id":43921,"created_at":"2019-12-07T10:03:42.890+08:00","updated_at":"2019-12-07T10:03:42.890+08:00"},{"id":1908716,"file_name":"fire.mp3","project_id":111891,"asset_id":43920,"created_at":"2019-12-07T10:03:42.892+08:00","updated_at":"2019-12-07T10:03:42.892+08:00"},{"id":1908717,"file_name":"cannon.mp3","project_id":111891,"asset_id":43919,"created_at":"2019-12-07T10:03:42.893+08:00","updated_at":"2019-12-07T10:03:42.893+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦