{"id":183199,"student_id":2589,"content":"","created_at":"2020-08-20T12:25:56.197+08:00","updated_at":"2020-08-20T12:26:23.209+08:00","name":"射氣球(試玩版) ","language":"javascript","screenshot":{"url":null},"parent_id":11102,"plugin":"Game.set({width: 1200, height: 900})\n\nvar bg_1 = createSprite('bg_1.png'); //背景1\nvar bg_2 = createSprite('bg_2.png'); //背景2\nvar target = createSprite('target.png'); //準星\nvar reward = createSprite('r0.png','r1.png','r2.png','r3.png','r4.png','r5.png','r6.png','r7.png','r8.png','r9.png','r10.png'); //獎品\nvar number = createSprite('n0.png','n1.png','n2.png','n3.png','n4.png','n5.png'); //倒數秒數\n\nnumber.opacity = 0.7;\nbg_1.layer = 1;\nnumber.layer = 2;\ntarget.layer = 3;\nreward.layer = 4;\nreward.hidden = true;\n\nvar endTime = Date.now() + 15000; //結束時間點\nvar clock = 0; //計數器\nvar scores = 0; //遊戲分數\nvar balloons = []; //存放氣球角色的陣列\n\ncreateSound('bgm.mp3', true);\n\nforever(loop); //重複不斷執行\n\nfunction loop () {\n target.x = cursor.x;\n target.y = cursor.y;\n\n clock++;\n if (clock%10 == 0) {\n //使用變數 b 存放新增創造的氣球\n var b = createSprite('a.png', 'b.png', 'c.png', 'd.png', 'e.png', 'g.png', 'f.png');\n var rand = Math.random();\n if (rand \u003c 0.3) b.costumeId = 0;\n else if (rand \u003c 0.6) b.costumeId = 1;\n else if (rand \u003c 0.7) b.costumeId = 2;\n else if (rand \u003c 0.8) b.costumeId = 3;\n else if (rand \u003c 0.9) b.costumeId = 4;\n else if (rand \u003c 0.95) b.costumeId = 5;\n else b.costumeId = 6;\n b.y = 1000;\n b.x = Math.random()*1000 + 100;\n balloons.push(b);\n }\n\n for (var i = 0; i \u003c balloons.length; i++) {\n //使用變數 b 存放從氣球陣列中逐一取出的氣球角色\n var b = balloons[i];\n if (b.costumeId == 0) b.y -= 3;\n if (b.costumeId == 1) b.y -= 5;\n if (b.costumeId == 2) b.y -= 7;\n if (b.costumeId == 3) b.y -= 8;\n if (b.costumeId == 4) b.y -= 8;\n if (b.costumeId == 5) b.y -= 7;\n if (b.costumeId == 6) b.y -= 6;\n\n if (cursor.isDown \u0026\u0026 b.touched(cursor)) {\n if (b.costumeId == 0) scores += 1;\n if (b.costumeId == 1) scores += 10;\n if (b.costumeId == 2) scores += 5;\n if (b.costumeId == 3) scores *= 2;\n if (b.costumeId == 4) scores /= 2;\n if (b.costumeId == 5) endTime += 3000;\n if (b.costumeId == 6) endTime = Date.now();\n b.destroy();\n scores = Math.floor(scores);\n createSound('shot.mp3');\n }\n }\n \n print(scores, 60, 20, 'white', 40);\n\n var time = Math.floor((endTime - Date.now())/1000);\n\n number.hidden = time \u003e 5;\n if (time == 5) number.costumeId = 5;\n if (time == 4) number.costumeId = 4;\n if (time == 3) number.costumeId = 3;\n if (time == 2) number.costumeId = 2;\n if (time == 1) number.costumeId = 1;\n if (time == 0) number.costumeId = 0;\n \n if (time \u003c 0) {\n reward.hidden = false;\n if (scores \u003e 10000000000) reward.costumeId = 0;\n else if (scores \u003e 1000000000) reward.costumeId = 1;\n else if (scores \u003e 100000000) reward.costumeId = 2;\n else if (scores \u003e 10000000) reward.costumeId = 3;\n else if (scores \u003e 1000000) reward.costumeId = 4;\n else if (scores \u003e 100000) reward.costumeId = 5;\n else if (scores \u003e 10000) reward.costumeId = 6;\n else if (scores \u003e 1000) reward.costumeId = 7;\n else if (scores \u003e 100) reward.costumeId = 8;\n else if (scores \u003e 10) reward.costumeId = 9;\n else reward.costumeId = 10;\n stop();\n }\n}","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":112,"hashid":"wdksdkzk","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3115682,"file_name":"target.png","project_id":183199,"asset_id":251338,"created_at":"2020-08-20T12:25:56.204+08:00","updated_at":"2020-08-20T12:25:56.204+08:00"},{"id":3115683,"file_name":"r10.png","project_id":183199,"asset_id":251337,"created_at":"2020-08-20T12:25:56.205+08:00","updated_at":"2020-08-20T12:25:56.205+08:00"},{"id":3115684,"file_name":"r9.png","project_id":183199,"asset_id":251336,"created_at":"2020-08-20T12:25:56.206+08:00","updated_at":"2020-08-20T12:25:56.206+08:00"},{"id":3115685,"file_name":"r8.png","project_id":183199,"asset_id":251335,"created_at":"2020-08-20T12:25:56.207+08:00","updated_at":"2020-08-20T12:25:56.207+08:00"},{"id":3115686,"file_name":"r7.png","project_id":183199,"asset_id":251334,"created_at":"2020-08-20T12:25:56.208+08:00","updated_at":"2020-08-20T12:25:56.208+08:00"},{"id":3115687,"file_name":"r6.png","project_id":183199,"asset_id":251333,"created_at":"2020-08-20T12:25:56.209+08:00","updated_at":"2020-08-20T12:25:56.209+08:00"},{"id":3115688,"file_name":"r5.png","project_id":183199,"asset_id":251332,"created_at":"2020-08-20T12:25:56.209+08:00","updated_at":"2020-08-20T12:25:56.209+08:00"},{"id":3115689,"file_name":"r4.png","project_id":183199,"asset_id":251331,"created_at":"2020-08-20T12:25:56.210+08:00","updated_at":"2020-08-20T12:25:56.210+08:00"},{"id":3115690,"file_name":"r3.png","project_id":183199,"asset_id":251330,"created_at":"2020-08-20T12:25:56.211+08:00","updated_at":"2020-08-20T12:25:56.211+08:00"},{"id":3115691,"file_name":"r2.png","project_id":183199,"asset_id":251329,"created_at":"2020-08-20T12:25:56.212+08:00","updated_at":"2020-08-20T12:25:56.212+08:00"},{"id":3115692,"file_name":"r1.png","project_id":183199,"asset_id":251328,"created_at":"2020-08-20T12:25:56.213+08:00","updated_at":"2020-08-20T12:25:56.213+08:00"},{"id":3115693,"file_name":"r0.png","project_id":183199,"asset_id":251327,"created_at":"2020-08-20T12:25:56.214+08:00","updated_at":"2020-08-20T12:25:56.214+08:00"},{"id":3115694,"file_name":"n5.png","project_id":183199,"asset_id":251326,"created_at":"2020-08-20T12:25:56.215+08:00","updated_at":"2020-08-20T12:25:56.215+08:00"},{"id":3115695,"file_name":"n4.png","project_id":183199,"asset_id":251325,"created_at":"2020-08-20T12:25:56.216+08:00","updated_at":"2020-08-20T12:25:56.216+08:00"},{"id":3115696,"file_name":"n3.png","project_id":183199,"asset_id":251324,"created_at":"2020-08-20T12:25:56.217+08:00","updated_at":"2020-08-20T12:25:56.217+08:00"},{"id":3115697,"file_name":"n2.png","project_id":183199,"asset_id":251323,"created_at":"2020-08-20T12:25:56.217+08:00","updated_at":"2020-08-20T12:25:56.217+08:00"},{"id":3115698,"file_name":"n1.png","project_id":183199,"asset_id":251322,"created_at":"2020-08-20T12:25:56.218+08:00","updated_at":"2020-08-20T12:25:56.218+08:00"},{"id":3115699,"file_name":"n0.png","project_id":183199,"asset_id":251321,"created_at":"2020-08-20T12:25:56.219+08:00","updated_at":"2020-08-20T12:25:56.219+08:00"},{"id":3115700,"file_name":"g.png","project_id":183199,"asset_id":251320,"created_at":"2020-08-20T12:25:56.220+08:00","updated_at":"2020-08-20T12:25:56.220+08:00"},{"id":3115701,"file_name":"f.png","project_id":183199,"asset_id":251319,"created_at":"2020-08-20T12:25:56.221+08:00","updated_at":"2020-08-20T12:25:56.221+08:00"},{"id":3115702,"file_name":"e.png","project_id":183199,"asset_id":251318,"created_at":"2020-08-20T12:25:56.222+08:00","updated_at":"2020-08-20T12:25:56.222+08:00"},{"id":3115703,"file_name":"d.png","project_id":183199,"asset_id":251317,"created_at":"2020-08-20T12:25:56.223+08:00","updated_at":"2020-08-20T12:25:56.223+08:00"},{"id":3115704,"file_name":"c.png","project_id":183199,"asset_id":251316,"created_at":"2020-08-20T12:25:56.224+08:00","updated_at":"2020-08-20T12:25:56.224+08:00"},{"id":3115705,"file_name":"bg_2.png","project_id":183199,"asset_id":251315,"created_at":"2020-08-20T12:25:56.225+08:00","updated_at":"2020-08-20T12:25:56.225+08:00"},{"id":3115706,"file_name":"bg_1.png","project_id":183199,"asset_id":251314,"created_at":"2020-08-20T12:25:56.226+08:00","updated_at":"2020-08-20T12:25:56.226+08:00"},{"id":3115707,"file_name":"b.png","project_id":183199,"asset_id":251313,"created_at":"2020-08-20T12:25:56.227+08:00","updated_at":"2020-08-20T12:25:56.227+08:00"},{"id":3115708,"file_name":"a.png","project_id":183199,"asset_id":251312,"created_at":"2020-08-20T12:25:56.228+08:00","updated_at":"2020-08-20T12:25:56.228+08:00"},{"id":3115709,"file_name":"shot.mp3","project_id":183199,"asset_id":172349,"created_at":"2020-08-20T12:25:56.229+08:00","updated_at":"2020-08-20T12:25:56.229+08:00"},{"id":3115710,"file_name":"bgm.mp3","project_id":183199,"asset_id":113696,"created_at":"2020-08-20T12:25:56.230+08:00","updated_at":"2020-08-20T12:25:56.230+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦