{"id":20658,"student_id":139,"content":"setBackdrop(\"bg.jpg\")\nvar score = 0\nvar arrow = createSprite({\n x: 320,\n y: 240,\n costumes: [\"arrow.png\"]\n});\nvar redDots = []\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}\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() * 400 + 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.3\n fire.forever(function () {\n this.direction += this.scale * 10\n this.scale += 0.01\n if (this.scale \u003e 2) {\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 if (target.costumeId == 1) {\n for (var i = 0; i \u003c 40; i++) {\n sound.play(\"dart.mp3\")\n var dart = createSprite(\"dart.png\");\n dart.moveTo(target)\n dart.direction += i *10\n dart.forever(function () {\n this.stepForward(4)\n if (this.x \u003e 540 || this.x \u003c 0 || this.y \u003c 0 || this.y \u003e 480) {\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 if (target.costumeId == 2) {\n for (var i = 0; i \u003c 40; i++) {\n sound.play(\"cannon.mp3\")\n var cannon = createSprite([\"cannon_1.png\", \"cannon_2.png\"])\n cannon.scale = 0.5\n cannon.chargingTime = 50\n cannon.forever(function () {\n if (this.chargingTime \u003e 0) {\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 \u003e 640 || this.x \u003c 0 || this.y \u003c 0 || this.y \u003e 480) {\n this.destroy()\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\n\n target.destroy()\n })\n\n\n}\n\nsetInterval(makeRedDot, 680)\nsetInterval(makeItem, 2000)\nsound.play(\"bgm.mp3\")\nforever(function () {\n\n print('score:'+score)\n\n\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\n for (var i = 0; i \u003c redDots.length; i++) {\n redDots[i].toward(arrow)\n redDots[i].stepForward(2)\n }\n});","created_at":"2018-01-21T10:51:54.452+08:00","updated_at":"2020-07-21T10:04:50.811+08:00","name":"Tilt To Live","language":"javascript","screenshot":{"url":"https://cdn1.koding.school/uploads/project/screenshot/20658/559cbfa7e4820d013e857e9037643fc6.jpg"},"parent_id":20090,"plugin":"","description":"好玩喔\n","note":null,"status":"public","like_student_ids":[139],"is_featured":false,"views":167,"hashid":"d5msy9rj","is_content_changed":false,"review_status":"pending","submitted_at":"2018-02-03T14:27:09.662+08:00","reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":405267,"file_name":"dart.mp3","project_id":20658,"asset_id":43933,"created_at":"2018-01-21T10:51:54.467+08:00","updated_at":"2018-01-21T10:51:54.467+08:00"},{"id":405268,"file_name":"hit.mp3","project_id":20658,"asset_id":43932,"created_at":"2018-01-21T10:51:54.471+08:00","updated_at":"2018-01-21T10:51:54.471+08:00"},{"id":405269,"file_name":"fire_icon.png","project_id":20658,"asset_id":43931,"created_at":"2018-01-21T10:51:54.474+08:00","updated_at":"2018-01-21T10:51:54.474+08:00"},{"id":405270,"file_name":"dart_icon.png","project_id":20658,"asset_id":43930,"created_at":"2018-01-21T10:51:54.476+08:00","updated_at":"2018-01-21T10:51:54.476+08:00"},{"id":405271,"file_name":"canon_icon.png","project_id":20658,"asset_id":43929,"created_at":"2018-01-21T10:51:54.478+08:00","updated_at":"2018-01-21T10:51:54.478+08:00"},{"id":405272,"file_name":"reddot.png","project_id":20658,"asset_id":43928,"created_at":"2018-01-21T10:51:54.479+08:00","updated_at":"2018-01-21T10:51:54.479+08:00"},{"id":405273,"file_name":"arrow.png","project_id":20658,"asset_id":43927,"created_at":"2018-01-21T10:51:54.481+08:00","updated_at":"2018-01-21T10:51:54.481+08:00"},{"id":405274,"file_name":"bg.jpg","project_id":20658,"asset_id":43926,"created_at":"2018-01-21T10:51:54.483+08:00","updated_at":"2018-01-21T10:51:54.483+08:00"},{"id":405275,"file_name":"cannon_2.png","project_id":20658,"asset_id":43925,"created_at":"2018-01-21T10:51:54.485+08:00","updated_at":"2018-01-21T10:51:54.485+08:00"},{"id":405276,"file_name":"cannon_1.png","project_id":20658,"asset_id":43924,"created_at":"2018-01-21T10:51:54.486+08:00","updated_at":"2018-01-21T10:51:54.486+08:00"},{"id":405277,"file_name":"dart.png","project_id":20658,"asset_id":43923,"created_at":"2018-01-21T10:51:54.488+08:00","updated_at":"2018-01-21T10:51:54.488+08:00"},{"id":405278,"file_name":"fire.png","project_id":20658,"asset_id":43922,"created_at":"2018-01-21T10:51:54.490+08:00","updated_at":"2018-01-21T10:51:54.490+08:00"},{"id":405279,"file_name":"bgm.mp3","project_id":20658,"asset_id":43921,"created_at":"2018-01-21T10:51:54.491+08:00","updated_at":"2018-01-21T10:51:54.491+08:00"},{"id":405280,"file_name":"fire.mp3","project_id":20658,"asset_id":43920,"created_at":"2018-01-21T10:51:54.493+08:00","updated_at":"2018-01-21T10:51:54.493+08:00"},{"id":405281,"file_name":"cannon.mp3","project_id":20658,"asset_id":43919,"created_at":"2018-01-21T10:51:54.495+08:00","updated_at":"2018-01-21T10:51:54.495+08:00"},{"id":414844,"file_name":"em.png","project_id":20658,"asset_id":48176,"created_at":"2018-02-01T21:56:58.309+08:00","updated_at":"2018-02-01T21:58:20.299+08:00"},{"id":414845,"file_name":"Mushroom.png","project_id":20658,"asset_id":48179,"created_at":"2018-02-01T22:00:53.240+08:00","updated_at":"2018-02-01T22:00:53.240+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦