{"id":187287,"student_id":3433,"content":"var score = 0;\nvar speed =1;\nvar bomb = createSprite(\"bomb.png\");\nbomb.scale = 0.2;\nbomb.direction = 180;\nbomb.layer = 10;\nbomb.cotationStyle = 'full';\nvar boat = createSprite('boat.png');\nboat.x = 320;\nboat.y = 80;\nboat.scale = 0.2;\nboat.layer = 5;\nboat.hp = 200;\nfunction creatEnemy(enemyCategory, missleCategory, rate) {\n var enemy = createSprite(enemyCategory);\n enemy.x = 20;\n enemy.y = Math.random()*280+180;\n enemy.scale = 0.2;\n enemyrotionStyle = 'flipped';\n if (Math.random()*2 \u003e 1) {\n enemy.direction = 270;\n enemy.x = 680;\n }\n enemy.forever(function() {\n enemy.stepForward(1);\n if (clocl%240===0) {\n var missle=createSprite(missileCategory);\n missile.x=enemy.x;\n missile.y=enemy.y;\n missile.scale=0.1;\n missile.forever(function(){\n missile.stepForward(rate); \n if(missile.y\u003c100){\n miaaile.destroy();\n }\n if(missile.touched(boat)){\n missile.destroy();\n boat.hp=boat.hp-(10*rate);\n }\n });\n }\n if(enemy.x\u003e640\u0026enemy.direction==90||enemy.x\u003c10\u0026\u0026enemy.direction==270){\n enemy.destroy();\n }\n \n });\n enemy.when(\"touched\", bomb,function(){\n enemy.destroy();\n boat.shot=false;\n score=score+(10*rate);\n });\n }\n\n forever(function() {\n if(clock%180===0){\n creatEnemy(\"enemy.png\", \"missle.png\",1);\n }\n if (boat.shot) {\n bomb.stepForward(2);\n if (bomb.y \u003e 480) {\n boat.shot = false;\n }\n } else {\n bomb.x = boat.x;\n bomb.y = boat.y;\n }\n });\n when(\"holding\", \"space\", function() {\n boat.shot = true;\n });\n when(\"holding\", \"left\", function() {\n boat.x = boat.x-4;\n });\n when(\"holding\", \"right\", function() {\n boat.x = boat.x+4;\n });","created_at":"2020-08-29T14:42:03.093+08:00","updated_at":"2020-08-29T15:26:39.360+08:00","name":"深水炸彈 副本","language":"javascript","screenshot":{"url":"https://cdn9.koding.school/uploads/project/screenshot/187287/89edcce60b8890776f43b51e69f48ea4.jpg"},"parent_id":10357,"plugin":"setBackdrop(\"#0072E3\");\nvar sky = createSprite(\"天空色.png\");\nsky.x = 320;\nsky.y = 50;\nsky.layer = 1;\nvar clock = 179;\nupdate(function(){\n\tclock++;\n});","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":123,"hashid":"d5msm9p3","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3181534,"file_name":"boat.png","project_id":187287,"asset_id":27734,"created_at":"2020-08-29T14:42:03.100+08:00","updated_at":"2020-08-29T14:42:03.100+08:00"},{"id":3181535,"file_name":"天空色.png","project_id":187287,"asset_id":27735,"created_at":"2020-08-29T14:42:03.102+08:00","updated_at":"2020-08-29T14:42:03.102+08:00"},{"id":3181536,"file_name":"bomb.png","project_id":187287,"asset_id":27736,"created_at":"2020-08-29T14:42:03.103+08:00","updated_at":"2020-08-29T14:42:03.103+08:00"},{"id":3181537,"file_name":"enemy.png","project_id":187287,"asset_id":27737,"created_at":"2020-08-29T14:42:03.104+08:00","updated_at":"2020-08-29T14:42:03.104+08:00"},{"id":3181538,"file_name":"enemy_boss.png","project_id":187287,"asset_id":27738,"created_at":"2020-08-29T14:42:03.105+08:00","updated_at":"2020-08-29T14:42:03.105+08:00"},{"id":3181539,"file_name":"missile_boss.png","project_id":187287,"asset_id":27739,"created_at":"2020-08-29T14:42:03.106+08:00","updated_at":"2020-08-29T14:42:03.106+08:00"},{"id":3181540,"file_name":"missile.png","project_id":187287,"asset_id":27740,"created_at":"2020-08-29T14:42:03.107+08:00","updated_at":"2020-08-29T14:42:03.107+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦