{"id":303059,"student_id":10,"content":"// 強制設定模式 chase, scatter, frightened\n// forceMode = 'scatter' // 設定強制模式\nimmortal = true // 無敵狀態\n\nredTarget.hidden = false;\nblueTarget.hidden = false;\npinkTarget.hidden = false;\norangeTarget.hidden = false;\n\n\nplayer.AI = function () {\n if (key.up) player.nextDirection = 0;\n if (key.down) player.nextDirection = 180;\n if (key.right) player.nextDirection = 90;\n if (key.left) player.nextDirection = 270;\n}\n\n/* ========== 預設 AI ========== */\nBlinky.AI = function () {\n var arr = getDirections(Blinky.X, Blinky.Y, Blinky.direction);\n var rand = Math.floor(Math.random() * arr.length);\n Blinky.nextDirection = arr[rand];\n}\n\nPinky.AI = function () {\n var arr = getDirections(Pinky.X, Pinky.Y, Pinky.direction);\n var rand = Math.floor(Math.random() * arr.length);\n Pinky.nextDirection = arr[rand];\n}\n\nInky.AI = function () {\n var arr = getDirections(Inky.X, Inky.Y, Inky.direction);\n var rand = Math.floor(Math.random() * arr.length);\n Inky.nextDirection = arr[rand];\n}\n\nClyde.AI = function () {\n var arr = getDirections(Clyde.X, Clyde.Y, Clyde.direction);\n var rand = Math.floor(Math.random() * arr.length);\n Clyde.nextDirection = arr[rand];\n}\n\n/* ========== 追逐模式下的 AI ========== */\nBlinky.chaseAI = function () {\n redTarget.moveTo(player);\n var arr = getDirections(Blinky.X, Blinky.Y, Blinky.direction);\n Blinky.toward(redTarget);\n Blinky.nextDirection = closest(arr, Blinky.direction);\n}\n\nPinky.chaseAI = function () {\n pinkTarget.moveTo(player);\n pinkTarget.direction = player.direction;\n pinkTarget.stepForward(14 * 4);\n var arr = getDirections(Pinky.X, Pinky.Y, Pinky.direction);\n Pinky.toward(pinkTarget);\n Pinky.nextDirection = closest(arr, Pinky.direction);\n}\n\nInky.chaseAI = function () {\n blueTarget.moveTo(player);\n blueTarget.direction = player.direction;\n blueTarget.stepForward(14 * 4);\n \n blueTarget.toward(Blinky);\n var d = blueTarget.distanceTo(Blinky);\n blueTarget.stepForward(-d);\n \n var arr = getDirections(Inky.X, Inky.Y, Inky.direction);\n Inky.toward(blueTarget);\n Inky.nextDirection = closest(arr, Inky.direction);\n}\n\nClyde.chaseAI = function () {\n if (Clyde.distanceTo(player) \u003e 120) {\n orangeTarget.moveTo(player);\n } else {\n orangeTarget.moveTo(117, 465);\n }\n \n var arr = getDirections(Clyde.X, Clyde.Y, Clyde.direction);\n Clyde.toward(orangeTarget);\n Clyde.nextDirection = closest(arr, Clyde.direction);\n}\n\n/* ========== 巡邏模式下的 AI ========== */\nBlinky.scatterAI = function () {\n redTarget.moveTo(522, 15);\n var arr = getDirections(Blinky.X, Blinky.Y, Blinky.direction);\n Blinky.toward(redTarget);\n Blinky.nextDirection = closest(arr, Blinky.direction);\n}\n\nPinky.scatterAI = function () {\n pinkTarget.moveTo(117, 15);\n var arr = getDirections(Pinky.X, Pinky.Y, Pinky.direction);\n Pinky.toward(pinkTarget);\n Pinky.nextDirection = closest(arr, Pinky.direction);\n}\n\nInky.scatterAI = function () {\n blueTarget.moveTo(522, 465);\n var arr = getDirections(Inky.X, Inky.Y, Inky.direction);\n Inky.toward(blueTarget);\n Inky.nextDirection = closest(arr, Inky.direction);\n}\n\nClyde.scatterAI = function () {\n orangeTarget.moveTo(117, 465);\n var arr = getDirections(Clyde.X, Clyde.Y, Clyde.direction);\n Clyde.toward(orangeTarget);\n Clyde.nextDirection = closest(arr, Clyde.direction);\n}\n\n/* ========== 返回鬼屋模式的 AI ========== */\nBlinky.backToHouseAI = function () {\n redTarget.moveTo(320, 240);\n var arr = getDirections(Blinky.X, Blinky.Y, Blinky.direction);\n Blinky.toward(redTarget);\n Blinky.nextDirection = closest(arr, Blinky.direction);\n}\n\nPinky.backToHouseAI = function () {\n pinkTarget.moveTo(320, 240);\n var arr = getDirections(Pinky.X, Pinky.Y, Pinky.direction);\n Pinky.toward(pinkTarget);\n Pinky.nextDirection = closest(arr, Pinky.direction);\n}\n\nInky.backToHouseAI = function () {\n blueTarget.moveTo(320, 240);\n var arr = getDirections(Inky.X, Inky.Y, Inky.direction);\n Inky.toward(blueTarget);\n Inky.nextDirection = closest(arr, Inky.direction);\n}\n\nClyde.backToHouseAI = function () {\n orangeTarget.moveTo(320, 240);\n var arr = getDirections(Clyde.X, Clyde.Y, Clyde.direction);\n Clyde.toward(orangeTarget);\n Clyde.nextDirection = closest(arr, Clyde.direction);\n}\n\nfunction closest(arr, target) {\n arr.sort(function (a, b) {\n var a = Math.abs(target - a);\n var b = Math.abs(target - b);\n if (a \u003e 180) a = 360 - a;\n if (b \u003e 180) b = 360 - b;\n return a - b;\n });\n return arr[0];\n}\n\nfunction getDirections(x, y, direction) {\n \n var arr = [];\n \n if (map[y][x + 1] == ' ' \u0026\u0026 direction != 270) arr.push(90);\n if (map[y][x - 1] == ' ' \u0026\u0026 direction != 90) arr.push(270);\n if (map[y - 1][x] == ' ' \u0026\u0026 direction != 180) arr.push(0);\n if (map[y + 1][x] == ' ' \u0026\u0026 direction != 0) arr.push(180);\n \n return arr;\n}\n\n\n\n\n\n\n\n","created_at":"2021-10-04T10:52:44.954+08:00","updated_at":"2021-10-04T16:27:04.931+08:00","name":"小精靈遊戲(預設版)","language":"javascript","screenshot":{"url":"https://cdn3.koding.school/uploads/project/screenshot/303059/708c955fbbdd718b807f211f0fcf2314.jpg"},"parent_id":2,"plugin":"setBackdrop('black');\n\nvar MODE; // chase, scatter, frightened\nvar tmpMODE;\nvar width = 15;\nvar offsetX = 110 + 7;\nvar offsetY = 15;\nvar food = [];\nvar level = 1;\nvar score = 0;\nvar timer = 0;\nvar life = 3;\nvar bestScore = 0;\nvar bonus = 100; // 吃掉鬼魂的獎勵\nvar startTime = Date.now();\nvar map = [\n '┏━━━━━━━━━━━━┓┏━━━━━━━━━━━━┓',\n '┃............┃┃............┃',\n '┃.┏━━┓.┏━━━┓.┃┃.┏━━━┓.┏━━┓.┃',\n '┃.┃ ┃.┃ ┃.┃┃.┃ ┃.┃ ┃.┃',\n '┃*┗━━┛.┗━━━┛.┗┛.┗━━━┛.┗━━┛*┃',\n '┃..........................┃',\n '┃.┏━━┓.┏┓.┏━━━━━━┓.┏┓.┏━━┓.┃',\n '┃.┗━━┛.┃┃.┗━━┓┏━━┛.┃┃.┗━━┛.┃',\n '┃......┃┃....┃┃....┃┃......┃',\n '┗━━━━┓.┃┗━━┓.┃┃.┏━━┛┃.┏━━━━┛',\n ' ┃.┃┏━━┛.┗┛.┗━━┓┃.┃ ',\n ' ┃.┃┃ ┃┃.┃ ',\n ' ┃.┃┃ ┏━┓ ┏━┓ ┃┃.┃ ',\n '━━━━━┛.┗┛ ┃┏┛ ┗┓┃ ┗┛.┗━━━━━',\n ' ┃┃ ┃┃ ',\n '━━━━━┓.┏┓ ┃┗━━━━┛┃ ┏┓.┏━━━━━',\n ' ┃.┃┃ ┗━━━━━━┛ ┃┃.┃ ',\n ' ┃.┃┃ ┃┃.┃ ',\n ' ┃.┃┃ ┏━━━━━━┓ ┃┃.┃ ',\n '┏━━━━┛.┗┛ ┗━━┓┏━━┛ ┗┛.┗━━━━┓',\n '┃............┃┃............┃',\n '┃.┏━━┓.┏━━━┓.┃┃.┏━━━┓.┏━━┓.┃',\n '┃.┗━┓┃.┗━━━┛.┃┃.┗━━━┛.┃┏━┛.┃',\n '┃*..┃┃.......┃┃.......┃┃..*┃',\n '┗━┓.┃┃.┏┓.┏━━┛┗━━┓.┏┓.┃┃.┏━┛',\n '┏━┛.┗┛.┃┃.┗━━┓┏━━┛.┃┃.┗┛.┗━┓',\n '┃......┃┃....┃┃....┃┃......┃',\n '┃.┏━━━━┛┗━━┓.┃┃.┏━━┛┗━━━━┓.┃',\n '┃.┗━━━━━━━━┛.┗┛.┗━━━━━━━━┛.┃',\n '┃..........................┃',\n '┗━━━━━━━━━━━━━━━━━━━━━━━━━━┛',\n]\n\nforever(function() {\n print('best: ' + bestScore, 10, 20, 'gold');\n print('score: ' + score, 10, 40, '#fff');\n print('level: ' + level, 10, 60, '#fff');\n print('mode: ' + MODE, 10, 80, '#fff');\n});\n\n// 地圖\nvar grid = (function (M) {\n var grid = {};\n for (var x = 0; x \u003c 28; x++) {\n grid[x] = {};\n for (var y = 0; y \u003c 31; y++) {\n var b = createSprite(['block_1.png', 'block_2.png', 'food.png', 'empty.png']);\n b.x = x*width + offsetX;\n b.y = y*width + offsetY;\n b.role = M[y][x];\n var t = M[y][x];\n b.scale = 1/7;\n b.isWall = ['┃', '━', '┛', '┗', '┏', '┓'].indexOf(t) !== -1\n if (['┃', '━', '┛', '┗', '┏', '┓'].indexOf(t) != -1) b.role = 'x';\n if (t == '━' || t == '┃') b.costumeId = 1;\n if (t == '.' || t == '*') b.costumeId = 2;\n if (t == ' ') b.costumeId = 3;\n if (t == '.') b.scale *= 0.25;\n if (t == '*') b.scale *= 0.5;\n if (t == '━') b.direction = 0;\n if (t == '┓') b.direction = 0;\n if (t == '┗') b.direction = 180;\n if (t == '┏') b.direction = 270;\n if (t == '.' || t == '*') food.push(b);\n grid[x][y] = b;\n }\n }\n\n for (var x = 0; x \u003c 28; x++) {\n for (var y = 0; y \u003c 31; y++) {\n var b = grid[x][y];\n b.count = 0;\n b.X = x;\n b.Y = y;\n if (x \u003e 0 \u0026\u0026 grid[x-1][y] \u0026\u0026 !grid[x-1][y].isWall) {\n b.left = grid[x-1][y];\n b.count++;\n }\n if (x \u003c 27 \u0026\u0026 grid[x+1][y] \u0026\u0026 !grid[x+1][y].isWall) {\n b.right = grid[x+1][y];\n b.count++;\n }\n if (y \u003c 30 \u0026\u0026 grid[x][y+1] \u0026\u0026 !grid[x][y+1].isWall) {\n b.bottom = grid[x][y+1];\n b.count++;\n }\n if (y \u003e 0 \u0026\u0026 grid[x][y-1] \u0026\u0026 !grid[x][y-1].isWall) {\n b.top = grid[x][y-1];\n b.count++;\n }\n }\n }\n\n forever(function() {\n pen.color = 'orange';\n pen.size = 4;\n pen.drawLine(299, 202, 341, 202);\n });\n return grid;\n})(map);\n\n\nfunction Player (costumes) {\n \n var s = createSprite(costumes);\n \n s.rotationStyle = 'fixed';\n s.speed = 1;\n s.X = 0;\n s.Y = 0;\n s.release = false;\n s.target = grid[0][0]; // 要移動到的目標格子\n \n s.mode = 'chase'; // chase, scatter, frightened, dead, leave\n \n s.forever(function() {\n s.updatePosition(); // 移動角色\n s.updateCostume(); // 更新造型\n });\n\n // 更新角色座標,朝著 target 的格子前進\n s.updatePosition = function () {\n\n if (s.release === false || MODE === 'pause') return;\n \n if (this.distanceTo(this.target) \u003e this.speed) {\n this.toward(this.target);\n this.stepForward(this.speed);\n } else {\n this.moveTo(this.target);\n this.X = this.target.X;\n this.Y = this.target.Y;\n this.decision();\n this.updateTarget();\n }\n }\n\n // 執行 AI 相關指令決策出下一個要移動的方向 nextDirection\n s.decision = function () {\n\n if (s.AI) s.AI();\n\n if (s.target.count \u003e= 3) {\n if (this.mode === 'chase' \u0026\u0026 s.chaseAI) s.chaseAI();\n if (this.mode === 'scatter' \u0026\u0026 s.scatterAI) s.scatterAI();\n if (this.mode === 'frightened' \u0026\u0026 s.frightenedAI) s.frightenedAI();\n if (this.mode === 'dead' \u0026\u0026 s.backToHouseAI) s.backToHouseAI();\n }\n \n if (this.mode === 'leave') this.leaveAI();\n }\n \n // 如果有 nextDirection 且是可以行走的格子\n // 更新下一個移動的目標 target\n s.updateTarget = function () {\n if (this.nextDirection == 0 \u0026\u0026 this.target.top) this.target = this.target.top;\n if (this.nextDirection == 90 \u0026\u0026 this.target.right) this.target = this.target.right;\n if (this.nextDirection == 180 \u0026\u0026 this.target.bottom) this.target = this.target.bottom;\n if (this.nextDirection == 270 \u0026\u0026 this.target.left) this.target = this.target.left;\n this.nextDirection = undefined;\n }\n \n // 角色造型切換\u0026移動時的動畫\n s.updateCostume = function () {\n this.costumeId = Math.floor(this.direction/90);\n \n if (this.mode == 'dead') this.costumeId += 8;\n if (this.mode == 'frightened') this.costumeId = 12;\n \n if (this.distanceTo(this.target) == 0) return;\n\n var bool = Math.floor(timer/150)%2 == 0;\n if (bool \u0026\u0026 (this.mode === 'chase' || MODE === 'scatter')) {\n this.costumeId += 4;\n }\n if (bool \u0026\u0026 this.mode === 'frightened') {\n this.costumeId += 1;\n }\n }\n \n // 離開鬼屋\n s.leaveAI = function () {\n if (s.target.top) s.nextDirection = 0;\n else if (s.target.right) s.nextDirection = 90;\n else if (s.target.left) s.nextDirection = 270;\n else s.nextDirection = 180;\n }\n\n // 角色轉向\n s.reverse = function () {\n if (this.direction == 0 \u0026\u0026 this.target.bottom) this.target = this.target.bottom;\n if (this.direction == 90 \u0026\u0026 this.target.left) this.target = this.target.left;\n if (this.direction == 180 \u0026\u0026 this.target.top) this.target = this.target.top;\n if (this.direction == 270 \u0026\u0026 this.target.right) this.target = this.target.right;\n }\n \n s.reset = function (x, y, direction) {\n s.X = x;\n s.Y = y;\n s.direction = direction;\n s.nextDirection = direction;\n s.target = grid[x][y];\n s.moveTo(grid[x][y]);\n }\n\n return s;\n}\n\n// 初始化四隻鬼魂、玩家角色\nvar Clyde = Player(['o1.png', 'o2.png', 'o3.png', 'o4.png', 'o5.png', 'o6.png', 'o7.png', 'o8.png', 'o9.png', 'o10.png', 'o11.png', 'o12.png', 'f13.png', 'f14.png']);\nvar Inky = Player(['b1.png', 'b2.png', 'b3.png', 'b4.png', 'b5.png', 'b6.png', 'b7.png', 'b8.png', 'b9.png', 'b10.png', 'b11.png', 'b12.png', 'f13.png', 'f14.png']);\nvar Pinky = Player(['p1.png', 'p2.png', 'p3.png', 'p4.png', 'p5.png', 'p6.png', 'p7.png', 'p8.png', 'p9.png', 'p10.png', 'p11.png', 'p12.png', 'f13.png', 'f14.png']);\nvar Blinky = Player(['r1.png', 'r2.png', 'r3.png', 'r4.png', 'r5.png', 'r6.png', 'r7.png', 'r8.png', 'r9.png', 'r10.png', 'r11.png', 'r12.png', 'f13.png', 'f14.png']);\nvar player = Player(['player_1.png', 'player.png', 'player_3.png', 'player_4.png', 'player_5.png', 'player_6.png', 'player_7.png', 'player_8.png', 'player_8.png', 'player_8.png', 'player_8.png', 'player_8.png', 'player_8.png', 'player_8.png']);\nvar ghosts = [Blinky, Inky, Pinky, Clyde];\n\nfunction restart () {\n MODE = 'pause';\n setTimeout(() =\u003e MODE='scatter', 2000);\n startTime = Date.now();\n Blinky.reset(12, 14, 90);\n Pinky.reset(13, 14, 90);\n Inky.reset(14, 14, 90);\n Clyde.reset(15, 14, 90);\n player.reset(13, 17, 90);\n}\nrestart();\n\nplayer.scale = 2;\nplayer.release = true;\nghosts.forEach((g) =\u003e g.scale = 0.23);\n\n// 神奇的傳送門\nghosts.concat(player).forEach((s) =\u003e {\n s.forever(function () {\n if (s.X == 1 \u0026\u0026 s.Y == 14 \u0026\u0026 s.distanceTo(grid[1][14]) == 0) {\n s.target = grid[25][14];\n s.moveTo(grid[26][14]);\n }\n if (s.X == 26 \u0026\u0026 s.Y == 14 \u0026\u0026 s.distanceTo(grid[26][14]) == 0) {\n s.target = grid[2][14];\n s.moveTo(grid[1][14]);\n }\n });\n});\n\n// 更新鬼魂的模式\nforever(function () {\n ghosts.forEach(function (g) {\n if (g.release === false) return g.mode = '';\n \n if (g.distanceTo(player) \u003c width) {\n if (g.mode === 'frightened') {\n score += bonus;\n bonus *= 2;\n g.mode = 'dead';\n createText('+'+bonus, g.x, g.y);\n }\n \n if (MODE !== 'frightened') {\n if (!window.immortal) {\n restart();\n life -= 1;\n if (life \u003c 0) {\n if (score \u003e bestScore) bestScore = score;\n life = 3;\n level = 1;\n } \n }\n }\n }\n \n if (g.mode !== 'dead') g.mode = MODE;\n \n if (g.x \u003e 270 \u0026\u0026 g.x \u003c 370 \u0026\u0026 g.y \u003e 190 \u0026\u0026 g.y \u003c 240) {\n g.mode = 'leave';\n }\n })\n});\n\nforever(function() {\n \n // 如果切換模式則鬼魂進行轉向\n if (tmpMODE !== MODE) {\n bonus = 100; // 疊加獎勵恢復成 100\n ghosts.forEach(function (g) {g.reverse()});\n }\n tmpMODE = MODE;\n \n if (MODE == 'pause') return;\n \n // 遊戲經過時間\n timer = Date.now() - startTime;\n\n if (MODE == 'frightened') return;\n \n // level 1\n if (level == 1) {\n if (timer \u003c 7000) MODE = 'scatter';\n else if (timer \u003c 27000) MODE = 'chase';\n else if (timer \u003c 34000) MODE = 'scatter';\n else if (timer \u003c 54000) MODE = 'chase';\n else if (timer \u003c 59000) MODE = 'scatter';\n else if (timer \u003c 79000) MODE = 'chase';\n else if (timer \u003c 84000) MODE = 'scatter';\n else MODE = 'chase';\n // level 2 ~ 4\n } else if (level \u003c 5) {\n if (timer \u003c 7000) MODE = 'scatter';\n else if (timer \u003c 27000) MODE = 'chase';\n else if (timer \u003c 34000) MODE = 'scatter';\n else if (timer \u003c 54000) MODE = 'chase';\n else if (timer \u003c 59000) MODE = 'scatter';\n else if (timer \u003c 79000) MODE = 'chase';\n else if (timer \u003c 84000) MODE = 'scatter';\n else MODE = 'chase';\n // level 5 以上\n } else {\n if (timer \u003c 7000) MODE = 'scatter';\n else if (timer \u003c 27000) MODE = 'chase';\n else if (timer \u003c 34000) MODE = 'scatter';\n else if (timer \u003c 54000) MODE = 'chase';\n else if (timer \u003c 59000) MODE = 'scatter';\n else if (timer \u003c 79000) MODE = 'chase';\n else if (timer \u003c 84000) MODE = 'scatter';\n else MODE = 'chase';\n }\n\n Blinky.release = timer \u003e 0;\n Pinky.release = timer \u003e 5000;\n Inky.release = timer \u003e 8000;\n Clyde.release = timer \u003e 11000;\n \n if (window.forceMode) {\n if (['scatter', 'chase', 'frightened'].includes(forceMode)) {\n MODE = forceMode\n }\n }\n});\n\nforever(function() {\n var limit = 2;\n var playerSpeed;\n var ghostsSpeed;\n // level 1\n if (level == 1) {\n if (MODE == 'frightened') {\n playerSpeed = limit*0.9;\n ghostsSpeed = limit*0.5;\n } else {\n playerSpeed = limit*0.8;\n ghostsSpeed = limit*0.75;\n }\n }\n // level 2 ~ 4\n else if (level \u003c 5) {\n if (MODE == 'frightened') {\n playerSpeed = limit*0.95;\n ghostsSpeed = limit*0.55;\n } else {\n playerSpeed = limit*0.9;\n ghostsSpeed = limit*0.85;\n }\n }\n // level \u003e= 5\n else {\n if (MODE == 'frightened') {\n playerSpeed = limit*1.0;\n ghostsSpeed = limit*0.6;\n } else {\n playerSpeed = limit*1.0;\n ghostsSpeed = limit*0.95;\n }\n }\n ghosts.forEach((g) =\u003e {\n if (g.mode == 'dead') g.speed = 10;\n else g.speed = ghostsSpeed;\n });\n player.speed = playerSpeed;\n});\n\nforever(function() {\n var success = true;\n food.forEach((f) =\u003e {\n success = f.hidden \u0026\u0026 success;\n if (!f.hidden \u0026\u0026 f.distanceTo(player) \u003c 5) {\n f.hidden = true;\n score += 10;\n if (f.role == '*') {\n MODE = 'frightened';\n setTimeout(function() {\n MODE = '';\n }, 8000);\n }\n }\n });\n if (success) nextLevel();\n});\n\nvar texts = [];\nfunction createText (text, x, y) {\n texts.push([text, x, y]);\n setTimeout(function () {\n texts.shift();\n }, 2000);\n forever(function(){\n texts.forEach(function (t) {\n print(t[0], t[1] - width, t[2] - width/2, 'lightblue', 14);\n });\n });\n}\n\nfunction nextLevel() {\n for (var x = 0; x \u003c 28; x++) {\n for (var y = 0; y \u003c 31; y++) {\n grid[x][y].hidden = false;\n }\n }\n restart();\n level++;\n}\n\n// 標記\nvar redTarget = createSprite('red_target.png');\nvar pinkTarget = createSprite('pink.png');\nvar blueTarget = createSprite('blue_target.png');\nvar orangeTarget = createSprite('orange_target.png');\n[redTarget, pinkTarget, blueTarget, orangeTarget].forEach((t) =\u003e {\n t.scale = 1.2/7;\n t.rotationStyle = 'fixed';\n t.hidden = true;\n});\n\nfor (var x=0; x\u003c31; x++) {\n for (var y=0; y\u003c28; y++) {\n if (map[x][y] == '.' || map[x][y] == '*') {\n map[x] = map[x].substr(0, y) + ' ' + map[x].substr(y + 1)\n }\n } \n}\n\n// 顯示剩餘生命\nvar lifes = [\n createSprite('player.png'),\n createSprite('player.png'),\n createSprite('player.png'),\n];\nfor (var i=0; i\u003c3; i++) {\n lifes[i].moveTo(80, 350 + 40*i);\n lifes[i].scale = 2;\n}\nforever(function(){\n if (life \u003c= 0) lifes[2].hidden = true;\n if (life \u003c= 1) lifes[1].hidden = true;\n if (life \u003c= 2) lifes[0].hidden = true;\n});\n\n","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":213,"hashid":"ej9s2rm6k","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":6148456,"file_name":"o9.png","project_id":303059,"asset_id":424232,"created_at":"2021-10-04T10:52:54.195+08:00","updated_at":"2021-10-04T10:52:54.195+08:00"},{"id":6148457,"file_name":"o12.png","project_id":303059,"asset_id":424233,"created_at":"2021-10-04T10:52:54.200+08:00","updated_at":"2021-10-04T10:52:54.200+08:00"},{"id":6148458,"file_name":"o11.png","project_id":303059,"asset_id":424234,"created_at":"2021-10-04T10:52:54.204+08:00","updated_at":"2021-10-04T10:52:54.204+08:00"},{"id":6148459,"file_name":"o10.png","project_id":303059,"asset_id":424235,"created_at":"2021-10-04T10:52:54.208+08:00","updated_at":"2021-10-04T10:52:54.208+08:00"},{"id":6148460,"file_name":"r8.png","project_id":303059,"asset_id":424236,"created_at":"2021-10-04T10:52:54.212+08:00","updated_at":"2021-10-04T10:52:54.212+08:00"},{"id":6148461,"file_name":"r7.png","project_id":303059,"asset_id":424237,"created_at":"2021-10-04T10:52:54.216+08:00","updated_at":"2021-10-04T10:52:54.216+08:00"},{"id":6148462,"file_name":"r6.png","project_id":303059,"asset_id":424238,"created_at":"2021-10-04T10:52:54.220+08:00","updated_at":"2021-10-04T10:52:54.220+08:00"},{"id":6148463,"file_name":"r5.png","project_id":303059,"asset_id":424239,"created_at":"2021-10-04T10:52:54.224+08:00","updated_at":"2021-10-04T10:52:54.224+08:00"},{"id":6148464,"file_name":"r4.png","project_id":303059,"asset_id":424240,"created_at":"2021-10-04T10:52:54.228+08:00","updated_at":"2021-10-04T10:52:54.228+08:00"},{"id":6148465,"file_name":"r3.png","project_id":303059,"asset_id":424241,"created_at":"2021-10-04T10:52:54.232+08:00","updated_at":"2021-10-04T10:52:54.232+08:00"},{"id":6148466,"file_name":"r2.png","project_id":303059,"asset_id":424242,"created_at":"2021-10-04T10:52:54.238+08:00","updated_at":"2021-10-04T10:52:54.238+08:00"},{"id":6148467,"file_name":"r1.png","project_id":303059,"asset_id":424243,"created_at":"2021-10-04T10:52:54.242+08:00","updated_at":"2021-10-04T10:52:54.242+08:00"},{"id":6148468,"file_name":"r9.png","project_id":303059,"asset_id":424244,"created_at":"2021-10-04T10:52:54.246+08:00","updated_at":"2021-10-04T10:52:54.246+08:00"},{"id":6148469,"file_name":"r10.png","project_id":303059,"asset_id":424245,"created_at":"2021-10-04T10:52:54.250+08:00","updated_at":"2021-10-04T10:52:54.250+08:00"},{"id":6148470,"file_name":"r12.png","project_id":303059,"asset_id":424246,"created_at":"2021-10-04T10:52:54.254+08:00","updated_at":"2021-10-04T10:52:54.254+08:00"},{"id":6148471,"file_name":"r11.png","project_id":303059,"asset_id":424247,"created_at":"2021-10-04T10:52:54.258+08:00","updated_at":"2021-10-04T10:52:54.258+08:00"},{"id":6148472,"file_name":"p12.png","project_id":303059,"asset_id":424248,"created_at":"2021-10-04T10:52:54.262+08:00","updated_at":"2021-10-04T10:52:54.262+08:00"},{"id":6148473,"file_name":"p11.png","project_id":303059,"asset_id":424249,"created_at":"2021-10-04T10:52:54.266+08:00","updated_at":"2021-10-04T10:52:54.266+08:00"},{"id":6148474,"file_name":"p10.png","project_id":303059,"asset_id":424250,"created_at":"2021-10-04T10:52:54.270+08:00","updated_at":"2021-10-04T10:52:54.270+08:00"},{"id":6148475,"file_name":"p9.png","project_id":303059,"asset_id":424251,"created_at":"2021-10-04T10:52:54.274+08:00","updated_at":"2021-10-04T10:52:54.274+08:00"},{"id":6148476,"file_name":"p8.png","project_id":303059,"asset_id":424252,"created_at":"2021-10-04T10:52:54.278+08:00","updated_at":"2021-10-04T10:52:54.278+08:00"},{"id":6148477,"file_name":"p7.png","project_id":303059,"asset_id":424253,"created_at":"2021-10-04T10:52:54.283+08:00","updated_at":"2021-10-04T10:52:54.283+08:00"},{"id":6148478,"file_name":"p6.png","project_id":303059,"asset_id":424254,"created_at":"2021-10-04T10:52:54.297+08:00","updated_at":"2021-10-04T10:52:54.297+08:00"},{"id":6148479,"file_name":"p5.png","project_id":303059,"asset_id":424255,"created_at":"2021-10-04T10:52:54.301+08:00","updated_at":"2021-10-04T10:52:54.301+08:00"},{"id":6148480,"file_name":"p4.png","project_id":303059,"asset_id":424256,"created_at":"2021-10-04T10:52:54.306+08:00","updated_at":"2021-10-04T10:52:54.306+08:00"},{"id":6148481,"file_name":"p3.png","project_id":303059,"asset_id":424257,"created_at":"2021-10-04T10:52:54.311+08:00","updated_at":"2021-10-04T10:52:54.311+08:00"},{"id":6148482,"file_name":"p2.png","project_id":303059,"asset_id":424258,"created_at":"2021-10-04T10:52:54.314+08:00","updated_at":"2021-10-04T10:52:54.314+08:00"},{"id":6148483,"file_name":"p1.png","project_id":303059,"asset_id":424259,"created_at":"2021-10-04T10:52:54.318+08:00","updated_at":"2021-10-04T10:52:54.318+08:00"},{"id":6148484,"file_name":"o8.png","project_id":303059,"asset_id":424260,"created_at":"2021-10-04T10:52:54.322+08:00","updated_at":"2021-10-04T10:52:54.322+08:00"},{"id":6148485,"file_name":"o7.png","project_id":303059,"asset_id":424261,"created_at":"2021-10-04T10:52:54.327+08:00","updated_at":"2021-10-04T10:52:54.327+08:00"},{"id":6148486,"file_name":"o6.png","project_id":303059,"asset_id":424262,"created_at":"2021-10-04T10:52:54.331+08:00","updated_at":"2021-10-04T10:52:54.331+08:00"},{"id":6148487,"file_name":"o5.png","project_id":303059,"asset_id":424263,"created_at":"2021-10-04T10:52:54.335+08:00","updated_at":"2021-10-04T10:52:54.335+08:00"},{"id":6148488,"file_name":"o4.png","project_id":303059,"asset_id":424264,"created_at":"2021-10-04T10:52:54.339+08:00","updated_at":"2021-10-04T10:52:54.339+08:00"},{"id":6148489,"file_name":"o3.png","project_id":303059,"asset_id":424265,"created_at":"2021-10-04T10:52:54.343+08:00","updated_at":"2021-10-04T10:52:54.343+08:00"},{"id":6148490,"file_name":"o2.png","project_id":303059,"asset_id":424266,"created_at":"2021-10-04T10:52:54.347+08:00","updated_at":"2021-10-04T10:52:54.347+08:00"},{"id":6148491,"file_name":"o1.png","project_id":303059,"asset_id":424267,"created_at":"2021-10-04T10:52:54.351+08:00","updated_at":"2021-10-04T10:52:54.351+08:00"},{"id":6148492,"file_name":"f14.png","project_id":303059,"asset_id":424268,"created_at":"2021-10-04T10:52:54.355+08:00","updated_at":"2021-10-04T10:52:54.355+08:00"},{"id":6148493,"file_name":"f13.png","project_id":303059,"asset_id":424269,"created_at":"2021-10-04T10:52:54.359+08:00","updated_at":"2021-10-04T10:52:54.359+08:00"},{"id":6148494,"file_name":"b12.png","project_id":303059,"asset_id":424270,"created_at":"2021-10-04T10:52:54.363+08:00","updated_at":"2021-10-04T10:52:54.363+08:00"},{"id":6148495,"file_name":"b11.png","project_id":303059,"asset_id":424271,"created_at":"2021-10-04T10:52:54.367+08:00","updated_at":"2021-10-04T10:52:54.367+08:00"},{"id":6148496,"file_name":"b10.png","project_id":303059,"asset_id":424272,"created_at":"2021-10-04T10:52:54.371+08:00","updated_at":"2021-10-04T10:52:54.371+08:00"},{"id":6148497,"file_name":"b9.png","project_id":303059,"asset_id":424273,"created_at":"2021-10-04T10:52:54.375+08:00","updated_at":"2021-10-04T10:52:54.375+08:00"},{"id":6148498,"file_name":"b8.png","project_id":303059,"asset_id":424274,"created_at":"2021-10-04T10:52:54.379+08:00","updated_at":"2021-10-04T10:52:54.379+08:00"},{"id":6148499,"file_name":"b7.png","project_id":303059,"asset_id":424275,"created_at":"2021-10-04T10:52:54.383+08:00","updated_at":"2021-10-04T10:52:54.383+08:00"},{"id":6148500,"file_name":"b6.png","project_id":303059,"asset_id":424276,"created_at":"2021-10-04T10:52:54.388+08:00","updated_at":"2021-10-04T10:52:54.388+08:00"},{"id":6148501,"file_name":"b5.png","project_id":303059,"asset_id":424277,"created_at":"2021-10-04T10:52:54.392+08:00","updated_at":"2021-10-04T10:52:54.392+08:00"},{"id":6148502,"file_name":"b4.png","project_id":303059,"asset_id":424278,"created_at":"2021-10-04T10:52:54.396+08:00","updated_at":"2021-10-04T10:52:54.396+08:00"},{"id":6148503,"file_name":"b3.png","project_id":303059,"asset_id":424279,"created_at":"2021-10-04T10:52:54.400+08:00","updated_at":"2021-10-04T10:52:54.400+08:00"},{"id":6148504,"file_name":"b2.png","project_id":303059,"asset_id":424280,"created_at":"2021-10-04T10:52:54.404+08:00","updated_at":"2021-10-04T10:52:54.404+08:00"},{"id":6148505,"file_name":"b1.png","project_id":303059,"asset_id":424281,"created_at":"2021-10-04T10:52:54.408+08:00","updated_at":"2021-10-04T10:52:54.408+08:00"},{"id":6148506,"file_name":"blue_target.png","project_id":303059,"asset_id":424282,"created_at":"2021-10-04T10:52:54.411+08:00","updated_at":"2021-10-04T10:52:54.411+08:00"},{"id":6148507,"file_name":"pink.png","project_id":303059,"asset_id":424283,"created_at":"2021-10-04T10:52:54.415+08:00","updated_at":"2021-10-04T10:52:54.415+08:00"},{"id":6148508,"file_name":"orange_target.png","project_id":303059,"asset_id":424284,"created_at":"2021-10-04T10:52:54.419+08:00","updated_at":"2021-10-04T10:52:54.419+08:00"},{"id":6148509,"file_name":"red_target.png","project_id":303059,"asset_id":424285,"created_at":"2021-10-04T10:52:54.423+08:00","updated_at":"2021-10-04T10:52:54.423+08:00"},{"id":6148510,"file_name":"food.png","project_id":303059,"asset_id":424286,"created_at":"2021-10-04T10:52:54.437+08:00","updated_at":"2021-10-04T10:52:54.437+08:00"},{"id":6148511,"file_name":"block_2.png","project_id":303059,"asset_id":424287,"created_at":"2021-10-04T10:52:54.441+08:00","updated_at":"2021-10-04T10:52:54.441+08:00"},{"id":6148512,"file_name":"block_1.png","project_id":303059,"asset_id":424288,"created_at":"2021-10-04T10:52:54.445+08:00","updated_at":"2021-10-04T10:52:54.445+08:00"},{"id":6148513,"file_name":"empty.png","project_id":303059,"asset_id":424289,"created_at":"2021-10-04T10:52:54.456+08:00","updated_at":"2021-10-04T10:52:54.456+08:00"},{"id":6148514,"file_name":"player.png","project_id":303059,"asset_id":424290,"created_at":"2021-10-04T10:52:54.460+08:00","updated_at":"2021-10-04T10:52:54.460+08:00"},{"id":6148515,"file_name":"player_4.png","project_id":303059,"asset_id":424291,"created_at":"2021-10-04T10:52:54.464+08:00","updated_at":"2021-10-04T10:52:54.464+08:00"},{"id":6148516,"file_name":"player_1.png","project_id":303059,"asset_id":424292,"created_at":"2021-10-04T10:52:54.468+08:00","updated_at":"2021-10-04T10:52:54.468+08:00"},{"id":6148517,"file_name":"player_3.png","project_id":303059,"asset_id":424293,"created_at":"2021-10-04T10:52:54.472+08:00","updated_at":"2021-10-04T10:52:54.472+08:00"},{"id":6148518,"file_name":"player_8.png","project_id":303059,"asset_id":424294,"created_at":"2021-10-04T10:52:54.476+08:00","updated_at":"2021-10-04T10:52:54.476+08:00"},{"id":6148519,"file_name":"player_6.png","project_id":303059,"asset_id":424295,"created_at":"2021-10-04T10:52:54.480+08:00","updated_at":"2021-10-04T10:52:54.480+08:00"},{"id":6148520,"file_name":"player_5.png","project_id":303059,"asset_id":424296,"created_at":"2021-10-04T10:52:54.484+08:00","updated_at":"2021-10-04T10:52:54.484+08:00"},{"id":6148521,"file_name":"player_7.png","project_id":303059,"asset_id":424297,"created_at":"2021-10-04T10:52:54.488+08:00","updated_at":"2021-10-04T10:52:54.488+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦