{"id":18470,"student_id":1791,"content":"var coins = [];\nvar skulls = [];\nvar point = 0;\nvar life = 3;\n\nfor (var i = 0; i \u003c 30; i += 1) {\n var coin = createSprite(\"coin.png\");\n coin.x = Math.random() * 640;\n coin.y = Math.random() * 480;\n coins.push(coin);\n};\nfor (i = 0; i \u003c 10; i += 1) {\n var skull = createSprite(\"skull.png\");\n skull.x = Math.random() * 640;\n skull.y = Math.random() * 480;\n skulls.push(skull);\n};\nsetTimeout(function () {\n for (i = 0; i \u003c coins.length; i += 1) {\n coins[i].opacity = 0.1;\n };\n for (i = 0; i \u003c skulls.length; i += 1) {\n skulls[i].opacity = 0.1;\n };\n}, 3000);\n\nforever(function () {\n for (i = 0; i \u003c coins.length; i += 1) {\n if (circle.touched(coins[i]) \u0026\u0026 cursor.isDown) {\n if (coins[i].opacity == 0.1) {\n point += 1;\n };\n coins[i].opacity = 1;\n };\n\n };\n for (i = 0; i \u003c skulls.length; i += 1) {\n if (circle.touched(skulls[i]) \u0026\u0026 cursor.isDown) {\n if (skulls[i].opacity == 0.1) {\n life -= 1;\n };\n skulls[i].opacity = 1;\n };\n\n };\n print(\"分數:\"+point, 20, 20, \"red\", 50);\n print(\"生命值:\"+life, 400, 20, \"red\", 50);\n if (life == 0) {\n stop();\n };\n if (point == 30) {\n print(\"You Win\", 300, 240, \"red\", 200);\n stop();\n };\n});","created_at":"2017-03-01T20:52:04.729+08:00","updated_at":"2019-10-23T22:15:28.727+08:00","name":"鑽石挖挖挖","language":"javascript","screenshot":{"url":"https://cdn6.koding.school/uploads/project/screenshot/18470/9cda6572df43d004cfa71c0dce304419.jpg"},"parent_id":11645,"plugin":"setBackdrop('bg.png');\nvar circle = createSprite(\"circle_2.png\");\ncircle.layer = -1;\n\nforever(function(){\n circle.moveTo(cursor);\n if (cursor.isDown) {\n var shadow = createSprite(\"circle.png\");\n shadow.layer = -1;\n shadow.moveTo(circle);\n }\n});","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":109,"hashid":"gk4sk6e2","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":377326,"file_name":"coin.png","project_id":18470,"asset_id":30796,"created_at":"2017-12-24T10:04:30.273+08:00","updated_at":"2017-12-24T10:04:30.273+08:00"},{"id":377327,"file_name":"skull.png","project_id":18470,"asset_id":30797,"created_at":"2017-12-24T10:04:30.275+08:00","updated_at":"2017-12-24T10:04:30.275+08:00"},{"id":377328,"file_name":"bg.png","project_id":18470,"asset_id":30798,"created_at":"2017-12-24T10:04:30.276+08:00","updated_at":"2017-12-24T10:04:30.276+08:00"},{"id":377329,"file_name":"circle_2.png","project_id":18470,"asset_id":30799,"created_at":"2017-12-24T10:04:30.278+08:00","updated_at":"2017-12-24T10:04:30.278+08:00"},{"id":377330,"file_name":"circle.png","project_id":18470,"asset_id":30800,"created_at":"2017-12-24T10:04:30.279+08:00","updated_at":"2017-12-24T10:04:30.279+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦