{"id":111632,"student_id":1780,"content":"//******第一章******//\nsetBackdrop(\"bg.jpg\"); \n\nvar arrow=createSprite({ \n x:320, \n y:240,\n costumes: 'arrow.png'\n});\n//******第一章******//\n\n\nvar score=0 //******第七章******//\n\n//******第二章******//\nvar redDots=[];\n\nfunction makeRedDot(){\n var reDot=createSprite(\"reddot.png\");\n reDot.x=Math.floor(Math.random()*2)*640;\n reDot.y=Math.floor(Math.random()*2)*480;\n redDots.push(reDot);\n\n}\n//******第二章******//\n\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 \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 \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 dart.when(\"touch\", redDots, function(dot){\n sound.play('hit.mp3');//******第七章******//\n score++//******第七章******//\n dot.destroy();\n });\n }\n \n }\n \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 \n target.destroy(); //******第三章******//\n });\n}\n\n\n\nsetInterval(makeRedDot,1000); //******第二章******//\nsetInterval(makeItem,3000);//******第三章******//\nsound.play('bgm.mp3');//******第七章******//\n\n\n\n\n//******第一章******//\nforever(function(){\n print(\"score:\"+score)//******第七章******//\n arrow.toward(cursor);\n var speed =arrow.distanceTo(cursor)/5;//主角和滑鼠之間的距離每次移動1/5\n arrow.stepForward(speed);\n\n//******第一章******// \n\n\n//******第二章******//\nif(arrow.touched(redDots)){\n stop();\n \n}\n\n\nfor(var i=0;i\u003credDots.length;i++){\n redDots[i].toward(arrow);\n redDots[i].stepForward(1);\n \n}\n\n//******第二章******//\n});\n\n\n\n","created_at":"2019-12-04T21:16:08.822+08:00","updated_at":"2019-12-04T22:30:13.239+08:00","name":"tilt to live 副本","language":"javascript","screenshot":{"url":"https://cdn6.koding.school/uploads/project/screenshot/111632/7e80e74e149cb7a72a804fea4217bc24.jpg"},"parent_id":20090,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":107,"hashid":"p93syk49","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":1903670,"file_name":"dart.mp3","project_id":111632,"asset_id":43933,"created_at":"2019-12-04T21:16:08.832+08:00","updated_at":"2019-12-04T21:16:08.832+08:00"},{"id":1903671,"file_name":"hit.mp3","project_id":111632,"asset_id":43932,"created_at":"2019-12-04T21:16:08.834+08:00","updated_at":"2019-12-04T21:16:08.834+08:00"},{"id":1903672,"file_name":"fire_icon.png","project_id":111632,"asset_id":43931,"created_at":"2019-12-04T21:16:08.838+08:00","updated_at":"2019-12-04T21:16:08.838+08:00"},{"id":1903673,"file_name":"dart_icon.png","project_id":111632,"asset_id":43930,"created_at":"2019-12-04T21:16:08.840+08:00","updated_at":"2019-12-04T21:16:08.840+08:00"},{"id":1903674,"file_name":"canon_icon.png","project_id":111632,"asset_id":43929,"created_at":"2019-12-04T21:16:08.842+08:00","updated_at":"2019-12-04T21:16:08.842+08:00"},{"id":1903675,"file_name":"reddot.png","project_id":111632,"asset_id":43928,"created_at":"2019-12-04T21:16:08.844+08:00","updated_at":"2019-12-04T21:16:08.844+08:00"},{"id":1903676,"file_name":"arrow.png","project_id":111632,"asset_id":43927,"created_at":"2019-12-04T21:16:08.846+08:00","updated_at":"2019-12-04T21:16:08.846+08:00"},{"id":1903677,"file_name":"bg.jpg","project_id":111632,"asset_id":43926,"created_at":"2019-12-04T21:16:08.847+08:00","updated_at":"2019-12-04T21:16:08.847+08:00"},{"id":1903678,"file_name":"cannon_2.png","project_id":111632,"asset_id":43925,"created_at":"2019-12-04T21:16:08.850+08:00","updated_at":"2019-12-04T21:16:08.850+08:00"},{"id":1903679,"file_name":"cannon_1.png","project_id":111632,"asset_id":43924,"created_at":"2019-12-04T21:16:08.852+08:00","updated_at":"2019-12-04T21:16:08.852+08:00"},{"id":1903680,"file_name":"dart.png","project_id":111632,"asset_id":43923,"created_at":"2019-12-04T21:16:08.853+08:00","updated_at":"2019-12-04T21:16:08.853+08:00"},{"id":1903681,"file_name":"fire.png","project_id":111632,"asset_id":43922,"created_at":"2019-12-04T21:16:08.855+08:00","updated_at":"2019-12-04T21:16:08.855+08:00"},{"id":1903682,"file_name":"bgm.mp3","project_id":111632,"asset_id":43921,"created_at":"2019-12-04T21:16:08.857+08:00","updated_at":"2019-12-04T21:16:08.857+08:00"},{"id":1903683,"file_name":"fire.mp3","project_id":111632,"asset_id":43920,"created_at":"2019-12-04T21:16:08.859+08:00","updated_at":"2019-12-04T21:16:08.859+08:00"},{"id":1903684,"file_name":"cannon.mp3","project_id":111632,"asset_id":43919,"created_at":"2019-12-04T21:16:08.861+08:00","updated_at":"2019-12-04T21:16:08.861+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦