{"id":183194,"student_id":2589,"content":"var 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}","created_at":"2020-08-20T12:15:24.092+08:00","updated_at":"2020-08-20T12:15:24.092+08:00","name":"射氣球(完整版) 副本","language":"javascript","screenshot":{"url":null},"parent_id":11102,"plugin":"Game.set({width: 1200, height: 900})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":93,"hashid":"vngse2j8","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3115580,"file_name":"r10.png","project_id":183194,"asset_id":199879,"created_at":"2020-08-20T12:15:24.098+08:00","updated_at":"2020-08-20T12:15:24.098+08:00"},{"id":3115581,"file_name":"n5.png","project_id":183194,"asset_id":199877,"created_at":"2020-08-20T12:15:24.100+08:00","updated_at":"2020-08-20T12:15:24.100+08:00"},{"id":3115582,"file_name":"n4.png","project_id":183194,"asset_id":199876,"created_at":"2020-08-20T12:15:24.100+08:00","updated_at":"2020-08-20T12:15:24.100+08:00"},{"id":3115583,"file_name":"n3.png","project_id":183194,"asset_id":199875,"created_at":"2020-08-20T12:15:24.101+08:00","updated_at":"2020-08-20T12:15:24.101+08:00"},{"id":3115584,"file_name":"n2.png","project_id":183194,"asset_id":199874,"created_at":"2020-08-20T12:15:24.102+08:00","updated_at":"2020-08-20T12:15:24.102+08:00"},{"id":3115585,"file_name":"n1.png","project_id":183194,"asset_id":199873,"created_at":"2020-08-20T12:15:24.103+08:00","updated_at":"2020-08-20T12:15:24.103+08:00"},{"id":3115586,"file_name":"n0.png","project_id":183194,"asset_id":199872,"created_at":"2020-08-20T12:15:24.104+08:00","updated_at":"2020-08-20T12:15:24.104+08:00"},{"id":3115587,"file_name":"target.png","project_id":183194,"asset_id":199868,"created_at":"2020-08-20T12:15:24.105+08:00","updated_at":"2020-08-20T12:15:24.105+08:00"},{"id":3115588,"file_name":"r9.png","project_id":183194,"asset_id":199866,"created_at":"2020-08-20T12:15:24.106+08:00","updated_at":"2020-08-20T12:15:24.106+08:00"},{"id":3115589,"file_name":"r8.png","project_id":183194,"asset_id":199865,"created_at":"2020-08-20T12:15:24.107+08:00","updated_at":"2020-08-20T12:15:24.107+08:00"},{"id":3115590,"file_name":"r7.png","project_id":183194,"asset_id":199864,"created_at":"2020-08-20T12:15:24.108+08:00","updated_at":"2020-08-20T12:15:24.108+08:00"},{"id":3115591,"file_name":"r6.png","project_id":183194,"asset_id":199863,"created_at":"2020-08-20T12:15:24.109+08:00","updated_at":"2020-08-20T12:15:24.109+08:00"},{"id":3115592,"file_name":"r5.png","project_id":183194,"asset_id":199862,"created_at":"2020-08-20T12:15:24.110+08:00","updated_at":"2020-08-20T12:15:24.110+08:00"},{"id":3115593,"file_name":"r4.png","project_id":183194,"asset_id":199861,"created_at":"2020-08-20T12:15:24.110+08:00","updated_at":"2020-08-20T12:15:24.110+08:00"},{"id":3115594,"file_name":"r3.png","project_id":183194,"asset_id":199860,"created_at":"2020-08-20T12:15:24.111+08:00","updated_at":"2020-08-20T12:15:24.111+08:00"},{"id":3115595,"file_name":"r2.png","project_id":183194,"asset_id":199859,"created_at":"2020-08-20T12:15:24.112+08:00","updated_at":"2020-08-20T12:15:24.112+08:00"},{"id":3115596,"file_name":"r1.png","project_id":183194,"asset_id":199858,"created_at":"2020-08-20T12:15:24.113+08:00","updated_at":"2020-08-20T12:15:24.113+08:00"},{"id":3115597,"file_name":"r0.png","project_id":183194,"asset_id":199857,"created_at":"2020-08-20T12:15:24.114+08:00","updated_at":"2020-08-20T12:15:24.114+08:00"},{"id":3115598,"file_name":"a.png","project_id":183194,"asset_id":199819,"created_at":"2020-08-20T12:15:24.115+08:00","updated_at":"2020-08-20T12:15:24.115+08:00"},{"id":3115599,"file_name":"g.png","project_id":183194,"asset_id":199810,"created_at":"2020-08-20T12:15:24.116+08:00","updated_at":"2020-08-20T12:15:24.116+08:00"},{"id":3115600,"file_name":"f.png","project_id":183194,"asset_id":199818,"created_at":"2020-08-20T12:15:24.117+08:00","updated_at":"2020-08-20T12:15:24.117+08:00"},{"id":3115601,"file_name":"e.png","project_id":183194,"asset_id":199817,"created_at":"2020-08-20T12:15:24.117+08:00","updated_at":"2020-08-20T12:15:24.117+08:00"},{"id":3115602,"file_name":"d.png","project_id":183194,"asset_id":199816,"created_at":"2020-08-20T12:15:24.118+08:00","updated_at":"2020-08-20T12:15:24.118+08:00"},{"id":3115603,"file_name":"bg_2.png","project_id":183194,"asset_id":199815,"created_at":"2020-08-20T12:15:24.119+08:00","updated_at":"2020-08-20T12:15:24.119+08:00"},{"id":3115604,"file_name":"bg_1.png","project_id":183194,"asset_id":199814,"created_at":"2020-08-20T12:15:24.120+08:00","updated_at":"2020-08-20T12:15:24.120+08:00"},{"id":3115605,"file_name":"c.png","project_id":183194,"asset_id":198397,"created_at":"2020-08-20T12:15:24.121+08:00","updated_at":"2020-08-20T12:15:24.121+08:00"},{"id":3115606,"file_name":"b.png","project_id":183194,"asset_id":198394,"created_at":"2020-08-20T12:15:24.122+08:00","updated_at":"2020-08-20T12:15:24.122+08:00"},{"id":3115607,"file_name":"pointer.png","project_id":183194,"asset_id":198063,"created_at":"2020-08-20T12:15:24.123+08:00","updated_at":"2020-08-20T12:15:24.123+08:00"},{"id":3115608,"file_name":"circle.png","project_id":183194,"asset_id":198061,"created_at":"2020-08-20T12:15:24.124+08:00","updated_at":"2020-08-20T12:15:24.124+08:00"},{"id":3115609,"file_name":"shot.mp3","project_id":183194,"asset_id":172349,"created_at":"2020-08-20T12:15:24.124+08:00","updated_at":"2020-08-20T12:15:24.124+08:00"},{"id":3115610,"file_name":"bgm.mp3","project_id":183194,"asset_id":113696,"created_at":"2020-08-20T12:15:24.125+08:00","updated_at":"2020-08-20T12:15:24.125+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦