{"id":129592,"student_id":10,"content":"setBackdrop(\"bg.jpg\");\nvar p1 = createSprite('idle.png', 'block.png', 'left.png', 'ko.png');\nvar p2 = createSprite('idle.png', 'block.png', 'left.png', 'ko.png');\nvar p1_lifeBar = createSprite('r0.jpg', 'r1.jpg', 'r2.jpg', 'r3.jpg', 'r4.jpg', 'r5.jpg', 'r6.jpg', 'r7.jpg', 'r8.jpg', 'r9.jpg', 'r10.jpg');\nvar p2_lifeBar = createSprite('r0.jpg', 'r1.jpg', 'r2.jpg', 'r3.jpg', 'r4.jpg', 'r5.jpg', 'r6.jpg', 'r7.jpg', 'r8.jpg', 'r9.jpg', 'r10.jpg');\nvar p1_powerBar = createSprite('b0.jpg', 'b1.jpg', 'b2.jpg', 'b3.jpg', 'b4.jpg', 'b5.jpg', 'b6.jpg', 'b7.jpg', 'b8.jpg', 'b9.jpg', 'b10.jpg');\nvar p2_powerBar = createSprite('b0.jpg', 'b1.jpg', 'b2.jpg', 'b3.jpg', 'b4.jpg', 'b5.jpg', 'b6.jpg', 'b7.jpg', 'b8.jpg', 'b9.jpg', 'b10.jpg');\nvar p1_power = 10;\nvar p1_life = 10;\nvar p2_power = 10;\nvar p2_life = 10;\n\np1.moveTo(120, 340);\np2.moveTo(520, 340);\np1_powerBar.moveTo(130, 55);\np2_powerBar.moveTo(510, 55);\np1_lifeBar.moveTo(130, 20);\np2_lifeBar.moveTo(510, 20);\n\non('keyup', 'w', p1_punch);\non('keyup', 'up', p2_punch);\nforever(loop);\nsetInterval(clock, 1000);\n\np2.direction += 180;\np2_powerBar.direction += 180;\np2_lifeBar.direction += 180;\np1.rotationStyle = 'flipped';\np2.rotationStyle = 'flipped';\n\ncreateSound('crowd.mp3', true);\ncreateSound('bgm.mp3', true);\n\nfunction loop () {\n \n p1.costumeId = 0;\n if (key.s) {\n p1.costumeId = 1;\n }\n if (key.w \u0026\u0026 p1_power \u003e 0) {\n p1.costumeId = 2;\n }\n if (key.d \u0026\u0026 p1.costumeId == 0) {\n p1.x += 3;\n p1.direction = 90;\n }\n if (key.a \u0026\u0026 p1.costumeId == 0) {\n p1.x -= 3;\n p1.direction = -90;\n }\n \n p2.costumeId = 0;\n if (key.down) {\n p2.costumeId = 1;\n }\n if (key.up \u0026\u0026 p2_power \u003e 0) {\n p2.costumeId = 2;\n }\n if (key.right \u0026\u0026 p2.costumeId == 0) {\n p2.x += 3;\n p2.direction = 90;\n }\n if (key.left \u0026\u0026 p2.costumeId == 0) {\n p2.x -= 3;\n p2.direction = -90;\n }\n \n if (p2_life \u003c= 0) {\n p2.costumeId = 3;\n stop();\n createSound('ko.mp3');\n createSound('bell.mp3');\n }\n if (p1_life \u003c= 0) {\n p1.costumeId = 3;\n stop();\n createSound('ko.mp3');\n createSound('bell.mp3');\n }\n \n p1_lifeBar.costumeId = p1_life;\n p2_lifeBar.costumeId = p2_life;\n p1_powerBar.costumeId = p1_power;\n p2_powerBar.costumeId = p2_power;\n}\n\nfunction p1_punch () {\n if (p1_power \u003e 0) {\n p1_power--;\n if (p1.touched(p2)) {\n if (p2.costumeId == 1) {\n if (p2_power \u003c 10) {\n p2_power++;\n }\n createSound('block.ogg');\n } else {\n p2_life--;\n createSound('hit.ogg'); \n }\n } else {\n createSound('wind.mp3');\n }\n }\n}\n\nfunction p2_punch () {\n if (p2_power \u003e 0) {\n p2_power--;\n if (p1.touched(p2)) {\n if (p1.costumeId == 1) {\n if (p1_power \u003c 10) {\n p1_power++;\n }\n createSound('block.ogg');\n } else {\n p1_life--; \n createSound('hit.ogg');\n }\n } else {\n createSound('wind.mp3');\n }\n }\n}\n\nfunction clock () {\n if (p1.costumeId == 0 \u0026\u0026 p1_power \u003c 10) {\n p1_power++;\n }\n if (p2.costumeId == 0 \u0026\u0026 p2_power \u003c 10) {\n p2_power++;\n }\n}","created_at":"2020-03-04T10:35:12.621+08:00","updated_at":"2020-10-19T12:11:23.394+08:00","name":"格鬥之王_概念版","language":"javascript","screenshot":{"url":"https://cdn3.koding.school/uploads/project/screenshot/129592/162d5e252ad4b530a3b92881a2ff7b90.jpg"},"parent_id":2,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":269,"hashid":"zpes2mwj","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2226535,"file_name":"wind.mp3","project_id":129592,"asset_id":192552,"created_at":"2020-03-05T10:44:13.563+08:00","updated_at":"2020-03-05T10:44:13.563+08:00"},{"id":2225665,"file_name":"block.png","project_id":129592,"asset_id":192395,"created_at":"2020-03-04T11:55:55.208+08:00","updated_at":"2020-03-04T11:55:55.208+08:00"},{"id":2225666,"file_name":"idle.png","project_id":129592,"asset_id":192396,"created_at":"2020-03-04T11:55:55.211+08:00","updated_at":"2020-03-04T11:55:55.211+08:00"},{"id":2225712,"file_name":"b2.jpg","project_id":129592,"asset_id":192410,"created_at":"2020-03-04T16:14:24.702+08:00","updated_at":"2020-03-04T16:14:24.702+08:00"},{"id":2225713,"file_name":"b3.jpg","project_id":129592,"asset_id":192411,"created_at":"2020-03-04T16:14:24.704+08:00","updated_at":"2020-03-04T16:14:24.704+08:00"},{"id":2225716,"file_name":"b6.jpg","project_id":129592,"asset_id":192414,"created_at":"2020-03-04T16:14:25.151+08:00","updated_at":"2020-03-04T16:14:25.151+08:00"},{"id":2225717,"file_name":"b7.jpg","project_id":129592,"asset_id":192415,"created_at":"2020-03-04T16:14:25.154+08:00","updated_at":"2020-03-04T16:14:25.154+08:00"},{"id":2226575,"file_name":"ko.mp3","project_id":129592,"asset_id":192554,"created_at":"2020-03-05T11:09:30.983+08:00","updated_at":"2020-03-05T11:09:30.983+08:00"},{"id":2225663,"file_name":"hurt.png","project_id":129592,"asset_id":192393,"created_at":"2020-03-04T11:55:54.923+08:00","updated_at":"2020-03-04T11:55:54.923+08:00"},{"id":2225664,"file_name":"ko.png","project_id":129592,"asset_id":192394,"created_at":"2020-03-04T11:55:54.928+08:00","updated_at":"2020-03-04T11:55:54.928+08:00"},{"id":2225667,"file_name":"dizzy.png","project_id":129592,"asset_id":192397,"created_at":"2020-03-04T11:55:55.450+08:00","updated_at":"2020-03-04T11:55:55.450+08:00"},{"id":2225668,"file_name":"left.png","project_id":129592,"asset_id":192398,"created_at":"2020-03-04T11:55:55.452+08:00","updated_at":"2020-03-04T11:55:55.452+08:00"},{"id":2225669,"file_name":"right.png","project_id":129592,"asset_id":192399,"created_at":"2020-03-04T11:55:55.688+08:00","updated_at":"2020-03-04T11:55:55.688+08:00"},{"id":2225670,"file_name":"block.ogg","project_id":129592,"asset_id":192400,"created_at":"2020-03-04T12:41:56.652+08:00","updated_at":"2020-03-04T12:41:56.652+08:00"},{"id":2225727,"file_name":"r6.jpg","project_id":129592,"asset_id":192445,"created_at":"2020-03-04T16:14:34.490+08:00","updated_at":"2020-03-04T16:14:34.490+08:00"},{"id":2225728,"file_name":"r7.jpg","project_id":129592,"asset_id":192446,"created_at":"2020-03-04T16:14:34.492+08:00","updated_at":"2020-03-04T16:14:34.492+08:00"},{"id":2225729,"file_name":"r8.jpg","project_id":129592,"asset_id":192447,"created_at":"2020-03-04T16:14:34.723+08:00","updated_at":"2020-03-04T16:14:34.723+08:00"},{"id":2225730,"file_name":"r9.jpg","project_id":129592,"asset_id":192448,"created_at":"2020-03-04T16:14:34.729+08:00","updated_at":"2020-03-04T16:14:34.729+08:00"},{"id":2225731,"file_name":"r10.jpg","project_id":129592,"asset_id":192449,"created_at":"2020-03-04T16:14:34.941+08:00","updated_at":"2020-03-04T16:14:34.941+08:00"},{"id":2225710,"file_name":"b0.jpg","project_id":129592,"asset_id":192408,"created_at":"2020-03-04T16:14:24.496+08:00","updated_at":"2020-03-04T16:14:24.496+08:00"},{"id":2225711,"file_name":"b1.jpg","project_id":129592,"asset_id":192409,"created_at":"2020-03-04T16:14:24.499+08:00","updated_at":"2020-03-04T16:14:24.499+08:00"},{"id":2225714,"file_name":"b4.jpg","project_id":129592,"asset_id":192412,"created_at":"2020-03-04T16:14:24.930+08:00","updated_at":"2020-03-04T16:14:24.930+08:00"},{"id":2225715,"file_name":"b5.jpg","project_id":129592,"asset_id":192413,"created_at":"2020-03-04T16:14:24.932+08:00","updated_at":"2020-03-04T16:14:24.932+08:00"},{"id":2225718,"file_name":"b8.jpg","project_id":129592,"asset_id":192416,"created_at":"2020-03-04T16:14:25.562+08:00","updated_at":"2020-03-04T16:14:25.562+08:00"},{"id":2225719,"file_name":"b9.jpg","project_id":129592,"asset_id":192417,"created_at":"2020-03-04T16:14:25.565+08:00","updated_at":"2020-03-04T16:14:25.565+08:00"},{"id":2225721,"file_name":"r0.jpg","project_id":129592,"asset_id":192408,"created_at":"2020-03-04T16:14:33.365+08:00","updated_at":"2020-03-04T16:14:33.365+08:00"},{"id":2225722,"file_name":"r1.jpg","project_id":129592,"asset_id":192440,"created_at":"2020-03-04T16:14:33.368+08:00","updated_at":"2020-03-04T16:14:33.368+08:00"},{"id":2225723,"file_name":"r2.jpg","project_id":129592,"asset_id":192441,"created_at":"2020-03-04T16:14:33.822+08:00","updated_at":"2020-03-04T16:14:33.822+08:00"},{"id":2225724,"file_name":"r3.jpg","project_id":129592,"asset_id":192442,"created_at":"2020-03-04T16:14:33.825+08:00","updated_at":"2020-03-04T16:14:33.825+08:00"},{"id":2225725,"file_name":"r4.jpg","project_id":129592,"asset_id":192443,"created_at":"2020-03-04T16:14:34.247+08:00","updated_at":"2020-03-04T16:14:34.247+08:00"},{"id":2225726,"file_name":"r5.jpg","project_id":129592,"asset_id":192444,"created_at":"2020-03-04T16:14:34.250+08:00","updated_at":"2020-03-04T16:14:34.250+08:00"},{"id":2226574,"file_name":"crowd.mp3","project_id":129592,"asset_id":192553,"created_at":"2020-03-05T10:59:54.146+08:00","updated_at":"2020-03-05T10:59:54.146+08:00"},{"id":2225720,"file_name":"b10.jpg","project_id":129592,"asset_id":192418,"created_at":"2020-03-04T16:14:25.774+08:00","updated_at":"2020-03-04T16:14:25.774+08:00"},{"id":2225899,"file_name":"bg.jpg","project_id":129592,"asset_id":192534,"created_at":"2020-03-04T17:55:45.839+08:00","updated_at":"2020-03-04T17:55:45.839+08:00"},{"id":2225489,"file_name":"hit.ogg","project_id":129592,"asset_id":192278,"created_at":"2020-03-04T11:14:50.699+08:00","updated_at":"2020-03-04T11:14:54.766+08:00"},{"id":2226576,"file_name":"bgm.mp3","project_id":129592,"asset_id":192555,"created_at":"2020-03-05T11:11:47.445+08:00","updated_at":"2020-03-05T11:11:47.445+08:00"},{"id":2225676,"file_name":"bgm_2.mp3","project_id":129592,"asset_id":192407,"created_at":"2020-03-04T15:32:05.189+08:00","updated_at":"2020-03-05T11:11:37.658+08:00"},{"id":2226577,"file_name":"bell.mp3","project_id":129592,"asset_id":192556,"created_at":"2020-03-05T11:13:52.533+08:00","updated_at":"2020-03-05T11:13:52.533+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦