{"id":323251,"student_id":10,"content":"let bg = createSprite('room_0.png', 'room_1.png', 'room_2.png', 'room_3.png', 'board.png', 'wall.png');\nlet board = createSprite('board.png');\nlet toaster = createSprite('toaster_0.png', 'toaster_1.png');\nlet freezer = createSprite('freezer_0.png', 'freezer_1.png');\nlet wardrobe = createSprite('wardrobe_0.png', 'wardrobe_1.png');\nlet curtain = createSprite('curtain_0.png', 'curtain_1.png', 'curtain_2.png');\nlet mini_clock = createSprite('clock.png');\nlet clock = createSprite('clock.png');\nlet h_pointer = createSprite('h_pointer.png');\nlet m_pointer = createSprite('m_pointer.png');\nlet lock_o = createSprite('lock_orange.png')\nlet lock_r = createSprite('lock_red.png');;\nlet lock_g = createSprite('lock_green.png');\nlet next = createSprite('next.png');\nlet prev = createSprite('prev.png');\nlet exit = createSprite('exit.png');\nlet key_o = createSprite('key_o.png');\nlet key_r = createSprite('key_r.png');\nlet key_g = createSprite('key_g.png');\nlet num1 = createSprite('0.png', '1.png', '2.png', '3.png', '4.png', '5.png', '6.png', '7.png', '8.png', '9.png');\nlet num2 = createSprite('0.png', '1.png', '2.png', '3.png', '4.png', '5.png', '6.png', '7.png', '8.png', '9.png');\nlet num3 = createSprite('0.png', '1.png', '2.png', '3.png', '4.png', '5.png', '6.png', '7.png', '8.png', '9.png');\nlet cat = createSprite('cat_0.png', 'cat_1.png');\nlet can = createSprite('can.png');\nlet myCursor = createSprite('empty.png', 'key_o.png', 'key_r.png', 'key_g.png', 'can.png', 'toast.png');\ncreateSprite('backpack.png');\nlet tool_1 = createSprite('key_o.png');\nlet tool_2 = createSprite('key_r.png');\nlet tool_3 = createSprite('key_g.png');\nlet tool_4 = createSprite('can.png');\nlet tool_5 = createSprite('toast.png');\n\nlet showGreenKey = false;\nlet showRedKey = false;\nlet hasKeyR = false;\nlet hasKeyO = false;\nlet hasKeyG = false;\nlet hasCan = false;\nlet hasToast = false;\nlet unLockRed = false;\nlet unLockOrange = false;\nlet unLockGreen = false;\n\nnext.x = 1100;\nprev.x = 100;\nexit.y = 800;\ncat.moveTo(923, 266);\ncan.moveTo(916, 447);\nkey_o.moveTo(277, 635);\nkey_r.moveTo(780, 780);\nboard.scale = 0.3;\nboard.moveTo(800, 450);\nmini_clock.scale = 0.5;\nmini_clock.moveTo(200, 450);\nnum1.moveTo(684, 197);\nnum2.moveTo(780, 197);\nnum3.moveTo(881, 197);\nkey_g.moveTo(277, 623);\ntool_1.moveTo(88, 807);\ntool_2.moveTo(188, 807);\ntool_3.moveTo(288, 807);\ntool_4.moveTo(388, 807);\ntool_5.moveTo(488, 807);\n\ncreateSound('bgm.mp3');\n\nfunction gameloop () {\n myCursor.moveTo(cursor);\n num1.hidden = bg.costumeId != 0;\n num2.hidden = bg.costumeId != 0;\n num3.hidden = bg.costumeId != 0;\n board.hidden = bg.costumeId != 0;\n wardrobe.hidden = bg.costumeId != 1;\n curtain.hidden = bg.costumeId != 2;\n mini_clock.hidden = bg.costumeId != 2;\n freezer.hidden = bg.costumeId != 3;\n toaster.hidden = bg.costumeId != 3;\n clock.hidden = bg.costumeId != 5;\n h_pointer.hidden = bg.costumeId != 5;\n m_pointer.hidden = bg.costumeId != 5;\n lock_o.hidden = bg.costumeId != 5;\n lock_r.hidden = bg.costumeId != 5;\n lock_g.hidden = bg.costumeId != 5;\n next.hidden = bg.costumeId \u003e 3;\n prev.hidden = bg.costumeId \u003e 3;\n exit.hidden = bg.costumeId \u003c 4;\n can.hidden = bg.costumeId != 3 || freezer.costumeId == 0;\n cat.hidden = bg.costumeId != 3;\n key_o.hidden = bg.costumeId != 1 || wardrobe.costumeId == 0;\n key_r.hidden = bg.costumeId != 0 || showRedKey == false;\n key_g.hidden = bg.costumeId != 3 || showGreenKey == false;\n tool_1.hidden = !hasKeyO;\n tool_2.hidden = !hasKeyR;\n tool_3.hidden = !hasKeyG;\n tool_4.hidden = !hasCan;\n tool_5.hidden = !hasToast;\n\n if (num1.costumeId == 7 \u0026\u0026 num2.costumeId == 2 \u0026\u0026 num3.costumeId == 5) {\n showRedKey = true;\n }\n\n if (m_pointer.direction == 180 \u0026\u0026 h_pointer.direction == 210) {\n alert('過關');\n stop();\n }\n}\n\nforever(gameloop);\n\nh_pointer.on('click', function () {\n if (unLockRed \u0026\u0026 unLockGreen \u0026\u0026 unLockOrange) {\n h_pointer.direction += 30;\n }\n})\n\nm_pointer.on('click', function () {\n if (unLockRed \u0026\u0026 unLockGreen \u0026\u0026 unLockOrange) {\n m_pointer.direction += 30;\n }\n})\n\nmini_clock.on('click', function () {\n bg.costumeId = 5;\n})\n\nboard.on('click', function () {\n bg.costumeId = 4;\n})\n\nfreezer.on('click', function () {\n if (freezer.costumeId == 0) {\n freezer.costumeId = 1;\n } else {\n freezer.costumeId = 0;\n }\n createSound('2.ogg');\n})\n\nwardrobe.on('click', function () {\n if (wardrobe.costumeId == 0) {\n wardrobe.costumeId = 1;\n } else {\n wardrobe.costumeId = 0;\n }\n createSound('3.ogg');\n})\n\ncurtain.on('click', function () {\n if (curtain.costumeId \u003c 2) curtain.costumeId += 1;\n})\n\nnext.on('click', function () {\n bg.costumeId += 1;\n if (bg.costumeId \u003e 3) bg.costumeId = 0;\n})\n\nprev.on('click', function () {\n bg.costumeId -= 1;\n if (bg.costumeId \u003c 0) bg.costumeId = 3;\n})\n\nexit.on('click', function () {\n bg.costumeId = 0;\n})\n\nnum1.on('click', function () {\n num1.costumeId += 1;\n if (num1.costumeId \u003e 9) num1.costumeId = 0;\n createSound('1.ogg');\n})\n\nnum2.on('click', function () {\n num2.costumeId += 1;\n if (num2.costumeId \u003e 9) num2.costumeId = 0;\n createSound('1.ogg');\n})\n\nnum3.on('click', function () {\n num3.costumeId += 1;\n if (num3.costumeId \u003e 9) num3.costumeId = 0;\n createSound('1.ogg');\n});\n\nkey_r.on('click', function () {\n key_r.destroy();\n hasKeyR = true;\n})\n\nkey_g.on('click', function () {\n key_g.destroy();\n hasKeyG = true;\n})\n\nkey_o.on('click', function () {\n key_o.destroy();\n hasKeyO = true;\n wardrobe.costumeId = 1;\n});\n\ncan.on('click', function () {\n can.destroy();\n hasCan = true;\n});\n\ncat.on('click', function () {\n if (hasCan) {\n hasCan = false;\n hasToast = true;\n cat.costumeId = 1;\n myCursor.costumeId = 0;\n }\n});\n\ntoaster.on('click', function () {\n if (hasToast) {\n hasToast = false;\n toaster.costumeId = 1;\n showGreenKey = true;\n myCursor.costumeId = 0;\n }\n})\n\ntool_1.on('click', function () {\n myCursor.costumeId = 1;\n})\ntool_2.on('click', function () {\n myCursor.costumeId = 2;\n})\ntool_3.on('click', function () {\n myCursor.costumeId = 3;\n})\ntool_4.on('click', function () {\n myCursor.costumeId = 4;\n})\ntool_5.on('click', function () {\n myCursor.costumeId = 5;\n});\n\nlock_o.on('click', function () {\n if (myCursor.costumeId == 1) {\n lock_o.destroy();\n myCursor.costumeId = 0;\n unLockOrange = true;\n }\n})\n\nlock_r.on('click', function () {\n if (myCursor.costumeId == 2) {\n lock_r.destroy();\n myCursor.costumeId = 0;\n unLockRed = true;\n }\n})\n\nlock_g.on('click', function () {\n if (myCursor.costumeId == 3) {\n lock_g.destroy();\n myCursor.costumeId = 0;\n unLockGreen = true;\n }\n});","created_at":"2021-12-07T14:10:00.834+08:00","updated_at":"2021-12-07T18:09:34.630+08:00","name":"要遲到ㄌ","language":"javascript","screenshot":{"url":"https://cdn7.koding.school/uploads/project/screenshot/323251/34dd9694fb80a3ac5c21ea97a6fa46f0.jpg"},"parent_id":2,"plugin":"Game.set({ width: 1200, height: 900 })","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":170,"hashid":"zpesj2wm9","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":6752565,"file_name":"cat_1.png","project_id":323251,"asset_id":446171,"created_at":"2021-12-07T15:22:04.983+08:00","updated_at":"2021-12-07T15:22:04.983+08:00"},{"id":6752566,"file_name":"cat_0.png","project_id":323251,"asset_id":446172,"created_at":"2021-12-07T15:22:04.985+08:00","updated_at":"2021-12-07T15:22:04.985+08:00"},{"id":6752747,"file_name":"toast.png","project_id":323251,"asset_id":446175,"created_at":"2021-12-07T15:45:25.233+08:00","updated_at":"2021-12-07T15:45:25.233+08:00"},{"id":6753080,"file_name":"3.png","project_id":323251,"asset_id":446373,"created_at":"2021-12-07T16:46:38.570+08:00","updated_at":"2021-12-07T16:46:38.570+08:00"},{"id":6753081,"file_name":"2.png","project_id":323251,"asset_id":446374,"created_at":"2021-12-07T16:46:38.572+08:00","updated_at":"2021-12-07T16:46:38.572+08:00"},{"id":6753082,"file_name":"1.png","project_id":323251,"asset_id":446375,"created_at":"2021-12-07T16:46:39.127+08:00","updated_at":"2021-12-07T16:46:39.127+08:00"},{"id":6753083,"file_name":"0.png","project_id":323251,"asset_id":446376,"created_at":"2021-12-07T16:46:39.129+08:00","updated_at":"2021-12-07T16:46:39.129+08:00"},{"id":6753087,"file_name":"5.ogg","project_id":323251,"asset_id":200337,"created_at":"2021-12-07T16:48:02.370+08:00","updated_at":"2021-12-07T16:48:02.370+08:00"},{"id":6753088,"file_name":"4.ogg","project_id":323251,"asset_id":200336,"created_at":"2021-12-07T16:48:03.281+08:00","updated_at":"2021-12-07T16:48:03.281+08:00"},{"id":6753093,"file_name":"bgm.mp3","project_id":323251,"asset_id":86527,"created_at":"2021-12-07T16:52:24.652+08:00","updated_at":"2021-12-07T16:52:24.652+08:00"},{"id":6753077,"file_name":"6.png","project_id":323251,"asset_id":446370,"created_at":"2021-12-07T16:46:37.469+08:00","updated_at":"2021-12-07T16:46:37.469+08:00"},{"id":6753078,"file_name":"5.png","project_id":323251,"asset_id":446371,"created_at":"2021-12-07T16:46:38.007+08:00","updated_at":"2021-12-07T16:46:38.007+08:00"},{"id":6753079,"file_name":"4.png","project_id":323251,"asset_id":446372,"created_at":"2021-12-07T16:46:38.009+08:00","updated_at":"2021-12-07T16:46:38.009+08:00"},{"id":6753085,"file_name":"2.ogg","project_id":323251,"asset_id":200339,"created_at":"2021-12-07T16:48:00.977+08:00","updated_at":"2021-12-07T16:48:00.977+08:00"},{"id":6752162,"file_name":"key_r.png","project_id":323251,"asset_id":446160,"created_at":"2021-12-07T14:49:07.659+08:00","updated_at":"2021-12-07T14:49:07.659+08:00"},{"id":6751864,"file_name":"lock_green.png","project_id":323251,"asset_id":446133,"created_at":"2021-12-07T14:10:39.099+08:00","updated_at":"2021-12-07T14:10:39.099+08:00"},{"id":6751865,"file_name":"lock_red.png","project_id":323251,"asset_id":446134,"created_at":"2021-12-07T14:10:39.101+08:00","updated_at":"2021-12-07T14:10:39.101+08:00"},{"id":6751866,"file_name":"lock_orange.png","project_id":323251,"asset_id":446135,"created_at":"2021-12-07T14:10:39.654+08:00","updated_at":"2021-12-07T14:10:39.654+08:00"},{"id":6751869,"file_name":"clock.png","project_id":323251,"asset_id":446138,"created_at":"2021-12-07T14:10:40.266+08:00","updated_at":"2021-12-07T14:10:40.266+08:00"},{"id":6751870,"file_name":"curtain_2.png","project_id":323251,"asset_id":446139,"created_at":"2021-12-07T14:10:40.830+08:00","updated_at":"2021-12-07T14:10:40.830+08:00"},{"id":6751871,"file_name":"curtain_1.png","project_id":323251,"asset_id":446140,"created_at":"2021-12-07T14:10:40.832+08:00","updated_at":"2021-12-07T14:10:40.832+08:00"},{"id":6751872,"file_name":"curtain_0.png","project_id":323251,"asset_id":446141,"created_at":"2021-12-07T14:10:41.729+08:00","updated_at":"2021-12-07T14:10:41.729+08:00"},{"id":6751874,"file_name":"room_0.png","project_id":323251,"asset_id":446143,"created_at":"2021-12-07T14:10:42.441+08:00","updated_at":"2021-12-07T14:10:42.441+08:00"},{"id":6751876,"file_name":"freezer_0.png","project_id":323251,"asset_id":446145,"created_at":"2021-12-07T14:10:43.035+08:00","updated_at":"2021-12-07T14:10:43.035+08:00"},{"id":6751877,"file_name":"toaster_1.png","project_id":323251,"asset_id":446146,"created_at":"2021-12-07T14:10:43.037+08:00","updated_at":"2021-12-07T14:10:43.037+08:00"},{"id":6751878,"file_name":"toaster_0.png","project_id":323251,"asset_id":446147,"created_at":"2021-12-07T14:10:43.589+08:00","updated_at":"2021-12-07T14:10:43.589+08:00"},{"id":6751880,"file_name":"wardrobe_1.png","project_id":323251,"asset_id":446149,"created_at":"2021-12-07T14:10:44.455+08:00","updated_at":"2021-12-07T14:10:44.455+08:00"},{"id":6751882,"file_name":"board.png","project_id":323251,"asset_id":446151,"created_at":"2021-12-07T14:10:45.185+08:00","updated_at":"2021-12-07T14:10:45.185+08:00"},{"id":6751883,"file_name":"wardrobe_0.png","project_id":323251,"asset_id":446152,"created_at":"2021-12-07T14:20:39.805+08:00","updated_at":"2021-12-07T14:20:39.805+08:00"},{"id":6751884,"file_name":"wall.png","project_id":323251,"asset_id":446153,"created_at":"2021-12-07T14:29:38.649+08:00","updated_at":"2021-12-07T14:29:38.649+08:00"},{"id":6751947,"file_name":"can.png","project_id":323251,"asset_id":446154,"created_at":"2021-12-07T14:37:38.474+08:00","updated_at":"2021-12-07T14:37:38.474+08:00"},{"id":6751948,"file_name":"prev.png","project_id":323251,"asset_id":446155,"created_at":"2021-12-07T14:39:40.217+08:00","updated_at":"2021-12-07T14:39:40.217+08:00"},{"id":6751949,"file_name":"next.png","project_id":323251,"asset_id":446156,"created_at":"2021-12-07T14:39:40.219+08:00","updated_at":"2021-12-07T14:39:40.219+08:00"},{"id":6752069,"file_name":"exit.png","project_id":323251,"asset_id":446157,"created_at":"2021-12-07T14:42:18.880+08:00","updated_at":"2021-12-07T14:42:18.880+08:00"},{"id":6752160,"file_name":"key_g.png","project_id":323251,"asset_id":446158,"created_at":"2021-12-07T14:49:07.147+08:00","updated_at":"2021-12-07T14:49:07.147+08:00"},{"id":6752161,"file_name":"key_o.png","project_id":323251,"asset_id":446159,"created_at":"2021-12-07T14:49:07.149+08:00","updated_at":"2021-12-07T14:49:07.149+08:00"},{"id":6752746,"file_name":"hand.png","project_id":323251,"asset_id":446174,"created_at":"2021-12-07T15:34:54.940+08:00","updated_at":"2021-12-07T15:34:54.940+08:00"},{"id":6753084,"file_name":"3.ogg","project_id":323251,"asset_id":200340,"created_at":"2021-12-07T16:48:00.259+08:00","updated_at":"2021-12-07T16:48:00.259+08:00"},{"id":6753086,"file_name":"1.ogg","project_id":323251,"asset_id":200338,"created_at":"2021-12-07T16:48:01.676+08:00","updated_at":"2021-12-07T16:48:01.676+08:00"},{"id":6752748,"file_name":"backpack.png","project_id":323251,"asset_id":446176,"created_at":"2021-12-07T15:45:32.086+08:00","updated_at":"2021-12-07T15:45:32.086+08:00"},{"id":6753057,"file_name":"empty.png","project_id":323251,"asset_id":446366,"created_at":"2021-12-07T16:32:10.731+08:00","updated_at":"2021-12-07T16:32:10.731+08:00"},{"id":6753074,"file_name":"9.png","project_id":323251,"asset_id":446367,"created_at":"2021-12-07T16:46:36.921+08:00","updated_at":"2021-12-07T16:46:36.921+08:00"},{"id":6753075,"file_name":"8.png","project_id":323251,"asset_id":446368,"created_at":"2021-12-07T16:46:36.923+08:00","updated_at":"2021-12-07T16:46:36.923+08:00"},{"id":6753076,"file_name":"7.png","project_id":323251,"asset_id":446369,"created_at":"2021-12-07T16:46:37.468+08:00","updated_at":"2021-12-07T16:46:37.468+08:00"},{"id":6753094,"file_name":"m_pointer.png","project_id":323251,"asset_id":446377,"created_at":"2021-12-07T16:53:51.161+08:00","updated_at":"2021-12-07T16:53:51.161+08:00"},{"id":6753095,"file_name":"h_pointer.png","project_id":323251,"asset_id":446378,"created_at":"2021-12-07T16:53:51.162+08:00","updated_at":"2021-12-07T16:53:51.162+08:00"},{"id":6753176,"file_name":"room_2.png","project_id":323251,"asset_id":446379,"created_at":"2021-12-07T17:07:51.066+08:00","updated_at":"2021-12-07T17:07:51.066+08:00"},{"id":6753177,"file_name":"room_3.png","project_id":323251,"asset_id":446380,"created_at":"2021-12-07T17:08:56.896+08:00","updated_at":"2021-12-07T17:08:56.896+08:00"},{"id":6753178,"file_name":"freezer_1.png","project_id":323251,"asset_id":446381,"created_at":"2021-12-07T17:10:08.920+08:00","updated_at":"2021-12-07T17:10:08.920+08:00"},{"id":6753179,"file_name":"room_1.png","project_id":323251,"asset_id":446382,"created_at":"2021-12-07T17:11:12.090+08:00","updated_at":"2021-12-07T17:11:12.090+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦