{"id":230695,"student_id":10,"content":"setBackdrop(\"bg.png\");\n\nlet player = createSprite(\"crow_0.png\", \"crow_1.png\", \"crow_2.png\");\nlet koding = createSprite(\"koding_0.png\", \"koding_1.png\", \"koding_2.png\", \"koding_3.png\", \"koding_4.png\");\nlet b_1 = createSprite(\"gull.png\");\nlet b_2 = createSprite(\"gull.png\");\nlet b_3 = createSprite(\"gull.png\");\nlet b_4 = createSprite(\"gull.png\");\nlet b_5 = createSprite(\"gull.png\");\nlet b_6 = createSprite(\"gull.png\");\nlet dog = createSprite(\"gull.png\");\nlet target = createSprite(\"f0.png\", \"f1.png\", \"f2.png\", \"f3.png\", \"f4.png\", \"f5.png\", \"f6.png\", \"f7.png\", \"f8.png\", \"f9.png\", \"f10.png\");\nlet arrow = createSprite(\"arrow.png\");\nlet info = createSprite(\"info.png\");\n\nlet birds = [b_1, b_2, b_3, b_4, b_5, b_6];\n\nlet status = 1; // 0: no one 1: koding 2: player\n\ncreateSound('bgm.mp3', true);\n\nkoding.y = 800;\narrow.moveTo(130, 300);\nb_1.moveTo(1200, 150);\nb_2.moveTo(1200 ,250);\nb_3.moveTo(0, 350);\nb_4.moveTo(0, 450);\nb_5.moveTo(1200, 550);\nb_6.moveTo(0, 650);\ndog.moveTo(1200, 850);\n\n\nfunction gameloop () {\n if (info.hidden) {\n updatePlayer();\n moveRight(b_1);\n moveRight(b_2);\n moveLeft(b_3);\n moveLeft(b_4);\n moveRight(b_5);\n moveLeft(b_6);\n moveLeft(dog);\n updateKoding();\n updateStatus();\n updateKodingCostumes();\n updatePlayerCostumes();\n updateBackground();\n }\n if (key.up || key.right || key.down) info.hidden = true;\n}\n\nfunction updatePlayer () {\n if (key.right) {\n player.x += 6;\n }\n if (key.left) {\n player.x -= 6;\n }\n if (key.up) {\n player.y -= 6;\n } else {\n player.y += 6;\n }\n \n if (status == 2) {\n player.y += 2;\n }\n \n if (player.y \u003e 850) {\n player.y = 850;\n }\n}\n\nfunction updateStatus () {\n if (player.touched(koding) \u0026\u0026 status == 1) {\n status = 2;\n createSound('oops_2.mp3');\n }\n if (player.touched(target) \u0026\u0026 status == 2) {\n status = 0;\n target.costumeId += 1;\n }\n if (player.touched(birds) \u0026\u0026 status == 2) {\n status = 0;\n createSound('oops.mp3');\n }\n \n if (target.costumeId == 5) {\n createSprite('success.png');\n print(target.costumeId, 540, 440, 'black', 60);\n stop();\n }\n}\n\nfunction moveRight(bird) {\n bird.x += 6;\n if (bird.x \u003e 1200) {\n bird.x -= 1200 + Math.random() * 1200;\n }\n if (bird.x % 100 \u003e 50) {\n bird.direction = 80;\n } else {\n bird.direction = 100;\n }\n}\n\nfunction moveLeft(bird) {\n bird.x -= 6;\n if (bird.x \u003c 0) {\n bird.x += 1200 + Math.random() * 1200;\n }\n if (bird.x % 100 \u003e 50) {\n bird.direction = 80;\n } else {\n bird.direction = 100;\n }\n}\n\nfunction updateKoding () {\n if (koding.costumeId != 4) {\n koding.x -= 8;\n }\n if (koding.x \u003c 0) {\n koding.x += 1200 + Math.random() * 1200;\n status = 1;\n }\n}\n\nfunction updateKodingCostumes () {\n if (koding.x % 100 \u003e 50) {\n koding.costumeId = 0;\n } else {\n koding.costumeId = 1;\n }\n if (status == 1) {\n koding.costumeId += 2;\n }\n if (status == 2) {\n koding.costumeId = 4;\n }\n}\n\nfunction updatePlayerCostumes () {\n if (status == 2) {\n player.costumeId = 1;\n } else {\n player.costumeId = 0;\n }\n}\n\nfunction updateBackground() {\n arrow.direction += 1/10;\n print(arrow.direction, 10,10,'black',30);\n if (arrow.direction \u003c 90) {\n setBackdrop('bg.png');\n }\n else if (arrow.direction \u003c 180) {\n setBackdrop('bg.png');\n }\n else if (arrow.direction \u003c 270) {\n setBackdrop('bg.png');\n }\n else {\n setBackdrop('bg.png');\n }\n if (arrow.direction \u003e= 360) {\n setBackdrop('bg.png');\n createSprite('fail.png');\n print(target.costumeId, 540, 440, 'black', 60);\n stop();\n }\n}\n\nforever(gameloop);\n","created_at":"2021-02-23T10:40:36.133+08:00","updated_at":"2021-02-23T18:06:13.079+08:00","name":"偷魚仔","language":"javascript","screenshot":{"url":"https://cdn9.koding.school/uploads/project/screenshot/230695/cc5a2c57a4fc589a71eb7fe46d55dc2f.jpg"},"parent_id":2,"plugin":"Game.set({width: 1200, height: 900})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":197,"hashid":"qmds8wn3e","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":4138591,"file_name":"f3.png","project_id":230695,"asset_id":319952,"created_at":"2021-02-23T16:40:45.027+08:00","updated_at":"2021-02-23T16:40:45.027+08:00"},{"id":4138592,"file_name":"f4.png","project_id":230695,"asset_id":319953,"created_at":"2021-02-23T16:40:45.028+08:00","updated_at":"2021-02-23T16:40:45.028+08:00"},{"id":4138593,"file_name":"f5.png","project_id":230695,"asset_id":319954,"created_at":"2021-02-23T16:40:46.147+08:00","updated_at":"2021-02-23T16:40:46.147+08:00"},{"id":4138594,"file_name":"f6.png","project_id":230695,"asset_id":319955,"created_at":"2021-02-23T16:40:46.149+08:00","updated_at":"2021-02-23T16:40:46.149+08:00"},{"id":4138022,"file_name":"crow_0.png","project_id":230695,"asset_id":319925,"created_at":"2021-02-23T10:41:13.320+08:00","updated_at":"2021-02-23T10:41:13.320+08:00"},{"id":4138023,"file_name":"crow_1.png","project_id":230695,"asset_id":319926,"created_at":"2021-02-23T10:41:13.322+08:00","updated_at":"2021-02-23T10:41:20.713+08:00"},{"id":4138595,"file_name":"f8.png","project_id":230695,"asset_id":319956,"created_at":"2021-02-23T16:40:47.319+08:00","updated_at":"2021-02-23T16:40:47.319+08:00"},{"id":4138596,"file_name":"f9.png","project_id":230695,"asset_id":319957,"created_at":"2021-02-23T16:40:47.321+08:00","updated_at":"2021-02-23T16:40:47.321+08:00"},{"id":4138597,"file_name":"f10.png","project_id":230695,"asset_id":319958,"created_at":"2021-02-23T16:40:48.114+08:00","updated_at":"2021-02-23T16:40:48.114+08:00"},{"id":4138607,"file_name":"oops_2.mp3","project_id":230695,"asset_id":319966,"created_at":"2021-02-23T17:39:17.407+08:00","updated_at":"2021-02-23T17:39:17.407+08:00"},{"id":4138600,"file_name":"bg.png","project_id":230695,"asset_id":319961,"created_at":"2021-02-23T17:04:05.521+08:00","updated_at":"2021-02-23T17:04:05.521+08:00"},{"id":4138605,"file_name":"arrow.png","project_id":230695,"asset_id":319964,"created_at":"2021-02-23T17:30:00.426+08:00","updated_at":"2021-02-23T17:30:00.426+08:00"},{"id":4138606,"file_name":"oops.mp3","project_id":230695,"asset_id":319965,"created_at":"2021-02-23T17:37:36.476+08:00","updated_at":"2021-02-23T17:37:36.476+08:00"},{"id":4138030,"file_name":"koding_2.png","project_id":230695,"asset_id":319933,"created_at":"2021-02-23T11:17:08.152+08:00","updated_at":"2021-02-23T11:17:08.152+08:00"},{"id":4138031,"file_name":"koding_3.png","project_id":230695,"asset_id":319934,"created_at":"2021-02-23T11:17:08.153+08:00","updated_at":"2021-02-23T11:17:08.153+08:00"},{"id":4138686,"file_name":"info.png","project_id":230695,"asset_id":319969,"created_at":"2021-02-23T17:53:17.795+08:00","updated_at":"2021-02-23T17:53:17.795+08:00"},{"id":4138024,"file_name":"crow_2.png","project_id":230695,"asset_id":319927,"created_at":"2021-02-23T10:41:13.972+08:00","updated_at":"2021-02-23T10:41:23.467+08:00"},{"id":4138028,"file_name":"koding_0.png","project_id":230695,"asset_id":319931,"created_at":"2021-02-23T11:17:07.344+08:00","updated_at":"2021-02-23T11:17:07.344+08:00"},{"id":4138029,"file_name":"koding_1.png","project_id":230695,"asset_id":319932,"created_at":"2021-02-23T11:17:07.346+08:00","updated_at":"2021-02-23T11:17:07.346+08:00"},{"id":4138025,"file_name":"gull.png","project_id":230695,"asset_id":319928,"created_at":"2021-02-23T10:50:27.299+08:00","updated_at":"2021-02-23T10:50:27.299+08:00"},{"id":4138032,"file_name":"koding_4.png","project_id":230695,"asset_id":319935,"created_at":"2021-02-23T11:17:08.735+08:00","updated_at":"2021-02-23T11:17:08.735+08:00"},{"id":4138588,"file_name":"f0.png","project_id":230695,"asset_id":319949,"created_at":"2021-02-23T16:40:42.925+08:00","updated_at":"2021-02-23T16:40:42.925+08:00"},{"id":4138598,"file_name":"fail.png","project_id":230695,"asset_id":319959,"created_at":"2021-02-23T16:48:13.769+08:00","updated_at":"2021-02-23T16:48:13.769+08:00"},{"id":4138599,"file_name":"success.png","project_id":230695,"asset_id":319960,"created_at":"2021-02-23T16:48:13.771+08:00","updated_at":"2021-02-23T16:48:13.771+08:00"},{"id":4138589,"file_name":"f1.png","project_id":230695,"asset_id":319950,"created_at":"2021-02-23T16:40:44.022+08:00","updated_at":"2021-02-23T16:40:44.022+08:00"},{"id":4138590,"file_name":"f2.png","project_id":230695,"asset_id":319951,"created_at":"2021-02-23T16:40:44.023+08:00","updated_at":"2021-02-23T16:40:44.023+08:00"},{"id":4138608,"file_name":"bgm.mp3","project_id":230695,"asset_id":319967,"created_at":"2021-02-23T17:42:43.952+08:00","updated_at":"2021-02-23T17:42:43.952+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦