{"id":39957,"student_id":1404,"content":"setBackdrop('background.jpg', 0, 0, 640, 480);\n\nvar koding = createSprite([\"koding.png\", \"koding_2.png\"]);\nvar arrow;\nvar flying = false;\nvar life = 5;\nvar scores = 0;\n\nwhen('click', function() {\n if (flying == true) {\n flying = false;\n scores += 1;\n arrow.opacity = 0.3;\n } else {\n life -= 1;\n }\n \n});\n\nforever(function() {\n \n arrow = createSprite('arrow.png');\n arrow.direction = Math.random() * 360;\n arrow.stepForward(500);\n arrow.toward(koding);\n\n if (/*沒有飛行中得箭 \u0026\u0026 */flying == false \u0026\u0026 Math.random()*100 \u003c 1) {\n arrow = createSprite(\"arrow.png\");\n arrow.direction = Math.random()*360;\n arrow.stepForward(500);\n arrow.toward(koding);\n //更新飛行狀態\n flying = true;\n }\n if (flying == true) {\n //箭向前移動8\n arrow.stepForward(8);\n if (arrow.touched(koding)) {\n flying = false\n life -= 1\n }\n }\n if (life == 0) {\n //1.叩叮眼睛叉叉 koding.costumeId = 1;\n //2.暫停遊戲 stop();\n koding.costumeId = 1;\n stop();\n }\n\n print('生命: ' + life , 10, 10, 'red', 20);\n print('攔截數量: ' + scores, 10, 40, 'red', 20);\n});\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// setBackdrop('background.jpg',0,0,640,480);\n\n// var koding = createSprite([\"koding.png\",\"koding_2.png\"]);\n// var arrow;\n// var flying = false;\n// var life = 5;\n// var scores = 0;\n\n// when('click',function() {\n// \tif(flying) {\n// flying = false;\n// scores += 1;\n// arrow.opacity = 0.3;\n// } else {\n// \t life -= 1;\n// }\n// });\n\n// forever(function() {\n// if(flying == false \u0026\u0026 Math.random()*100\u003c1) {\n// \t arrow = createSprite(\"arrow.png\");\n// arrow.direction = Math.random()*360;\n// arrow.stepForward(500);\n// arrow.toward(koding);\n// flying = true;\n// }\n// if(flying) {\n// \tarrow.stepForward(7);\n// if(arrow.touched(koding)) {\n// life -= 1;\n// flying = false;\n// }\n// }\n// if(life \u003c= 0) {\n// koding.costumeId = 1;\n// \t stop();\n// }\n// print('生命: ' + life, 10, 10, 'red', 20);\n// print('攔截數量: ' + scores, 10, 40, 'red', 20);\n// });","created_at":"2018-08-25T17:23:29.696+08:00","updated_at":"2019-10-24T03:49:34.527+08:00","name":"終結叩汀 副本","language":"javascript","screenshot":{"url":"https://cdn1.koding.school/uploads/project/screenshot/39957/bc8bbc3c5b7ed97d55c7a9c80b75d028.jpg"},"parent_id":8789,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":87,"hashid":"kdmsygmn","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":705286,"file_name":"background.jpg","project_id":39957,"asset_id":23106,"created_at":"2018-08-25T17:23:29.706+08:00","updated_at":"2018-08-25T17:23:29.706+08:00"},{"id":705287,"file_name":"arrow.png","project_id":39957,"asset_id":23107,"created_at":"2018-08-25T17:23:29.708+08:00","updated_at":"2018-08-25T17:23:29.708+08:00"},{"id":705288,"file_name":"koding_2.png","project_id":39957,"asset_id":28755,"created_at":"2018-08-25T17:23:29.712+08:00","updated_at":"2018-08-25T17:23:29.712+08:00"},{"id":705289,"file_name":"koding.png","project_id":39957,"asset_id":28756,"created_at":"2018-08-25T17:23:29.714+08:00","updated_at":"2018-08-25T17:23:29.714+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦