{"id":183206,"student_id":2589,"content":"","created_at":"2020-08-20T13:05:17.357+08:00","updated_at":"2023-03-12T10:15:43.669+08:00","name":"逃離洞窟(試玩版) ","language":"javascript","screenshot":{"url":null},"parent_id":183205,"plugin":"Game.set({ width: 1200, height: 900 })\n\nsetBackdrop('bg.png'); //設定背景圖\nvar maze = createSprite('1.png', '2.png', '3.png', '4.png', 'youwin.png'); //遊戲關卡\nvar wheel = createSprite('wheel.png'); //轉盤\nvar t1 = createSprite('t1.png'); //紅色目標\nvar t2 = createSprite('t2.png'); //黃色目標\nvar t3 = createSprite('t3.png'); //藍色目標\nvar t4 = createSprite('t4.png'); //綠色目標\nvar player = createSprite('player.png'); //發光ㄉ小精靈\n\nvar active = false; //是否開始跟隨滑鼠\nvar count = 0; //計時器\n\nt1.moveTo(1200, 900);\nt2.moveTo(0, 900);\nt3.moveTo(1200, 0);\nt4.moveTo(0, 0);\nplayer.moveTo(50, 50);\n\ncreateSound('bgm.mp3', true); //不斷播放背景音樂\n\nforever(loop); //不斷重複執行遊戲迴圈\n\n// 遊戲迴圈\nfunction loop () {\n\n wheel.direction = wheel.direction + 1;\n t1.direction = t1.direction - 0.2;\n t2.direction = t2.direction - 0.2;\n t3.direction = t3.direction - 0.2;\n t4.direction = t4.direction - 0.2;\n\n //如果開始跟隨模式,就不斷設定玩家位置到滑鼠位置\n if (active == true) {\n player.x = cursor.x;\n player.y = cursor.y;\n count = count + 1; //移動中才會計時\n }\n //如果玩家碰到滑鼠\n if (player.touched(cursor) == true) {\n active = true; //開始跟隨滑鼠\n }\n if (player.touched(t1) == true) {\n maze.costumeId = 1; //切換到第二關\n }\n if (player.touched(t2) == true) {\n maze.costumeId = 2; //切換到第三關\n }\n if (player.touched(t3) == true) {\n maze.costumeId = 3; //切換到第四關\n }\n if (player.touched(t4) == true \u0026\u0026 maze.costumeId == 3) {\n maze.costumeId = 4; //切換到遊戲勝利\n wheel.hidden = true; //隱藏轉盤\n stop(); //停止遊戲\n }\n // 如果玩家碰到地圖或者碰到中間轉盤就重置位置\n if (player.touched(maze) == true || player.touched(wheel) == true) {\n active = false; //停止跟隨滑鼠\n if (maze.costumeId == 0) {\n player.moveTo(50, 50);\n }\n if (maze.costumeId == 1) {\n player.moveTo(1150, 850);\n }\n if (maze.costumeId == 2) {\n player.moveTo(50, 850);\n }\n if (maze.costumeId == 3) {\n player.moveTo(1150, 50);\n }\n createSound('hit.ogg');\n }\n\n var sec = Math.floor(count/60); //遊戲迴圈一秒約執行 60 次\n print('花費時間' + sec + '秒', 500, 30, 'white', 30, 'Comic Sans MS');\n}","description":null,"note":null,"status":"public","like_student_ids":[12113,10331,11149,12699,15015,9893,9877,6729,12472,27631,9254,22020,26954,16200,20923,24217,5135,22240,15259,30022,17119,32762,22392,16209,26482,26415,8046,33563,27966,35986,12023,27129,23484,35825,34790,26704,20764,38763,32685,56526,54059,40575,38994,40231,42219,21742,35460,41701,43118,48037,50210,38985,52471,50507,47553],"is_featured":false,"views":2166,"hashid":"zpes9ygr","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3115801,"file_name":"bgm.mp3","project_id":183206,"asset_id":188533,"created_at":"2020-08-20T13:05:17.364+08:00","updated_at":"2020-08-20T13:05:17.364+08:00"},{"id":3115802,"file_name":"hit.ogg","project_id":183206,"asset_id":188534,"created_at":"2020-08-20T13:05:17.365+08:00","updated_at":"2020-08-20T13:05:17.365+08:00"},{"id":3115803,"file_name":"1.png","project_id":183206,"asset_id":202094,"created_at":"2020-08-20T13:05:17.366+08:00","updated_at":"2020-08-20T13:05:17.366+08:00"},{"id":3115804,"file_name":"2.png","project_id":183206,"asset_id":202095,"created_at":"2020-08-20T13:05:17.367+08:00","updated_at":"2020-08-20T13:05:17.367+08:00"},{"id":3115805,"file_name":"3.png","project_id":183206,"asset_id":251339,"created_at":"2020-08-20T13:05:17.368+08:00","updated_at":"2020-08-20T13:05:17.368+08:00"},{"id":3115806,"file_name":"4.png","project_id":183206,"asset_id":202096,"created_at":"2020-08-20T13:05:17.370+08:00","updated_at":"2020-08-20T13:05:17.370+08:00"},{"id":3115807,"file_name":"bg.png","project_id":183206,"asset_id":202097,"created_at":"2020-08-20T13:05:17.371+08:00","updated_at":"2020-08-20T13:05:17.371+08:00"},{"id":3115808,"file_name":"gameover.png","project_id":183206,"asset_id":202098,"created_at":"2020-08-20T13:05:17.372+08:00","updated_at":"2020-08-20T13:05:17.372+08:00"},{"id":3115809,"file_name":"player.png","project_id":183206,"asset_id":202099,"created_at":"2020-08-20T13:05:17.373+08:00","updated_at":"2020-08-20T13:05:17.373+08:00"},{"id":3115810,"file_name":"t1.png","project_id":183206,"asset_id":202100,"created_at":"2020-08-20T13:05:17.374+08:00","updated_at":"2020-08-20T13:05:17.374+08:00"},{"id":3115811,"file_name":"t2.png","project_id":183206,"asset_id":202101,"created_at":"2020-08-20T13:05:17.375+08:00","updated_at":"2020-08-20T13:05:17.375+08:00"},{"id":3115812,"file_name":"t3.png","project_id":183206,"asset_id":202102,"created_at":"2020-08-20T13:05:17.376+08:00","updated_at":"2020-08-20T13:05:17.376+08:00"},{"id":3115813,"file_name":"t4.png","project_id":183206,"asset_id":202103,"created_at":"2020-08-20T13:05:17.377+08:00","updated_at":"2020-08-20T13:05:17.377+08:00"},{"id":3115814,"file_name":"wheel.png","project_id":183206,"asset_id":202104,"created_at":"2020-08-20T13:05:17.378+08:00","updated_at":"2020-08-20T13:05:17.378+08:00"},{"id":3115815,"file_name":"youwin.png","project_id":183206,"asset_id":202105,"created_at":"2020-08-20T13:05:17.379+08:00","updated_at":"2020-08-20T13:05:17.379+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦