{"id":187461,"student_id":3325,"content":"setBackdrop(\"bg.jpg\");\n\nvar arrow = createSprite({\n x: 320,\n y: 240,\n costumes: 'arrow.png'\n});\nvar redDots = [];\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\", \"cannon_1.png\", \"cannon_2.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 if (target.costumeId === 0) {\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 \u003e 3) {\n this.destroy();\n }\n });\n fire.when('touch', redDots, function(dot) {\n dot.destroy();\n });\n }\n if (target.costumeId == 1) {\n for (var i = 0; i \u003c 8; 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 \u003e 640 || this.x \u003c 0 || this.y \u003c 0) {\n this.destroy();\n }\n });\n dart.when('touch', redDots, function(dot) {\n dot.destroy();\n });\n }\n\n }\n if (target.costumeId == 2) {\n var cannon = createSprite(['cannon_1.png', 'cannon_2.png']);\n cannon.chargingTime = 100;\n cannon.scale = 0.5;\n cannon.forever(function() {\n if (this.chargingTime \u003e 0) {\n this.moveTo(arrow);\n this.direction = arrow.direction;\n this.stepForward(28);\n this.scale += 0.005;\n this.chargingTime--;\n } else {\n this.costumeId = 1;\n this.stepForward(10);\n if (this.x \u003e 640 || this.x \u003c 0 || this.y \u003c 0 || this.y \u003e 480) {\n this.destroy();\n }\n }\n });\n\n cannon.when('touch', redDots, function(dot) {\n dot.destroy();\n });\n }\n target.destroy();\n });\n}\n\n\n\n\nsetInterval(makeRedDot, 1000);\nsetInterval(makeItem, 1000);\n\nforever(function() {\n arrow.toward(cursor);\n var speed = arrow.distanceTo(cursor)/10;\n arrow.stepForward(speed);\n\n if (arrow.touched(redDots)) {\n stop();\n }\n for (var i = 0; i \u003c redDots.length; i++) {\n redDots[i].toward(arrow);\n redDots[i].stepForward(1);\n }\n});","created_at":"2020-08-29T17:10:39.392+08:00","updated_at":"2020-09-19T17:23:44.913+08:00","name":"tilt to live 副本","language":"javascript","screenshot":{"url":"https://cdn6.koding.school/uploads/project/screenshot/187461/4286725d66a1d0560ca244c4d49feacf.jpg"},"parent_id":20090,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":138,"hashid":"882szeqr","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3184895,"file_name":"dart.mp3","project_id":187461,"asset_id":43933,"created_at":"2020-08-29T17:10:39.402+08:00","updated_at":"2020-08-29T17:10:39.402+08:00"},{"id":3184896,"file_name":"hit.mp3","project_id":187461,"asset_id":43932,"created_at":"2020-08-29T17:10:39.403+08:00","updated_at":"2020-08-29T17:10:39.403+08:00"},{"id":3184897,"file_name":"fire_icon.png","project_id":187461,"asset_id":43931,"created_at":"2020-08-29T17:10:39.404+08:00","updated_at":"2020-08-29T17:10:39.404+08:00"},{"id":3184898,"file_name":"dart_icon.png","project_id":187461,"asset_id":43930,"created_at":"2020-08-29T17:10:39.405+08:00","updated_at":"2020-08-29T17:10:39.405+08:00"},{"id":3184899,"file_name":"canon_icon.png","project_id":187461,"asset_id":43929,"created_at":"2020-08-29T17:10:39.407+08:00","updated_at":"2020-08-29T17:10:39.407+08:00"},{"id":3184900,"file_name":"reddot.png","project_id":187461,"asset_id":43928,"created_at":"2020-08-29T17:10:39.408+08:00","updated_at":"2020-08-29T17:10:39.408+08:00"},{"id":3184901,"file_name":"arrow.png","project_id":187461,"asset_id":43927,"created_at":"2020-08-29T17:10:39.409+08:00","updated_at":"2020-08-29T17:10:39.409+08:00"},{"id":3184902,"file_name":"bg.jpg","project_id":187461,"asset_id":43926,"created_at":"2020-08-29T17:10:39.410+08:00","updated_at":"2020-08-29T17:10:39.410+08:00"},{"id":3184903,"file_name":"cannon_2.png","project_id":187461,"asset_id":43925,"created_at":"2020-08-29T17:10:39.411+08:00","updated_at":"2020-08-29T17:10:39.411+08:00"},{"id":3184904,"file_name":"cannon_1.png","project_id":187461,"asset_id":43924,"created_at":"2020-08-29T17:10:39.412+08:00","updated_at":"2020-08-29T17:10:39.412+08:00"},{"id":3184905,"file_name":"dart.png","project_id":187461,"asset_id":43923,"created_at":"2020-08-29T17:10:39.413+08:00","updated_at":"2020-08-29T17:10:39.413+08:00"},{"id":3184906,"file_name":"fire.png","project_id":187461,"asset_id":43922,"created_at":"2020-08-29T17:10:39.415+08:00","updated_at":"2020-08-29T17:10:39.415+08:00"},{"id":3184907,"file_name":"bgm.mp3","project_id":187461,"asset_id":43921,"created_at":"2020-08-29T17:10:39.416+08:00","updated_at":"2020-08-29T17:10:39.416+08:00"},{"id":3184908,"file_name":"fire.mp3","project_id":187461,"asset_id":43920,"created_at":"2020-08-29T17:10:39.417+08:00","updated_at":"2020-08-29T17:10:39.417+08:00"},{"id":3184909,"file_name":"cannon.mp3","project_id":187461,"asset_id":43919,"created_at":"2020-08-29T17:10:39.418+08:00","updated_at":"2020-08-29T17:10:39.418+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦