{"id":235725,"student_id":10,"content":"setBackdrop(\"bg.png\")\nlet player = createSprite(\"p_0.png\", \"p_1.png\", \"p_2.png\", \"p_3.png\", \"p_4.png\", \"p_5.png\");\nlet master = createSprite(\"dad_0.png\");\nlet targets = [];\nlet count = 30;\n\nmaster.scale = 0.5;\nplayer.rotationStyle = 'fixed';\nmaster.rotationStyle = 'fixed';\nmaster.layer = 1;\n\nfor (let i=0; i\u003c30; i++) {\n let target = createSprite(\"baby_0.png\");\n target.rotationStyle = 'fixed';\n target.x = Math.random() * 1200;\n target.y = Math.random() * 900;\n targets.push(target);\n}\n\nplayer.x = 100\nplayer.y = 100\nmaster.x = 1000\nmaster.y = 700\n\nfunction gameloop () {\n drawText('剩餘:' + count, 10, 10, 'black', 30);\n player.toward(cursor)\n player.stepForward(5)\n targets.forEach(updateTarget)\n master.toward(player)\n master.stepForward(3)\n inBox(player)\n inBox(master)\n \n if (master.touched(player)) {\n drawText('遊戲失敗', 100, 100, 'red', 100);\n stop();\n }\n if (count == 0) {\n drawText('遊戲獲勝', 100, 100, 'black', 100);\n stop();\n }\n}\n\nfunction updateTarget(t) {\n t.toward(player)\n t.direction += 180;\n t.stepForward(6)\n t.toward(master)\n t.toward(600, 450)\n t.stepForward(4)\n inBox(t)\n \n if (player.touched(t)) {\n t.destroy()\n count -= 1;\n }\n if (t.hidden == false \u0026\u0026 t.y \u003e 800 \u0026\u0026 t.x \u003e500 \u0026\u0026 t.x \u003c 700) {\n t.destroy()\n t.hidden = true;\n count -= 1;\n }\n}\n\nfunction inBox (s) {\n if (s.x \u003e 1150) s.x = 115;\n if (s.y \u003e 850) s.y = 850;\n if (s.x \u003c 50) s.x = 50;\n if (s.y \u003c 50) s.y = 50;\n}\n\nforever(gameloop)","created_at":"2021-03-15T17:17:33.359+08:00","updated_at":"2021-05-07T08:38:11.114+08:00","name":"叩叮捉小雞","language":"javascript","screenshot":{"url":"https://cdn6.koding.school/uploads/project/screenshot/235725/d994dc5e768a49cb80a5325b0747ca7c.jpg"},"parent_id":2,"plugin":"Game.set({width: 1200, height: 900})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":205,"hashid":"yeysv4m3z","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":4350469,"file_name":"baby_0.png","project_id":235725,"asset_id":330407,"created_at":"2021-03-26T17:42:11.195+08:00","updated_at":"2021-03-26T17:42:11.195+08:00"},{"id":4350470,"file_name":"baby_1.png","project_id":235725,"asset_id":330408,"created_at":"2021-03-26T17:42:11.197+08:00","updated_at":"2021-03-26T17:42:11.197+08:00"},{"id":4350475,"file_name":"info.png","project_id":235725,"asset_id":330413,"created_at":"2021-03-26T17:42:13.936+08:00","updated_at":"2021-03-26T17:42:13.936+08:00"},{"id":4350471,"file_name":"bg.png","project_id":235725,"asset_id":330409,"created_at":"2021-03-26T17:42:12.102+08:00","updated_at":"2021-03-26T17:42:12.102+08:00"},{"id":4350472,"file_name":"dad_0.png","project_id":235725,"asset_id":330410,"created_at":"2021-03-26T17:42:12.104+08:00","updated_at":"2021-03-26T17:42:12.104+08:00"},{"id":4350473,"file_name":"dad_1.png","project_id":235725,"asset_id":330411,"created_at":"2021-03-26T17:42:12.865+08:00","updated_at":"2021-03-26T17:42:12.865+08:00"},{"id":4350474,"file_name":"fail.png","project_id":235725,"asset_id":330412,"created_at":"2021-03-26T17:42:12.867+08:00","updated_at":"2021-03-26T17:42:12.867+08:00"},{"id":4350476,"file_name":"mom_0.png","project_id":235725,"asset_id":330414,"created_at":"2021-03-26T17:42:13.937+08:00","updated_at":"2021-03-26T17:42:13.937+08:00"},{"id":4350479,"file_name":"p_1.png","project_id":235725,"asset_id":330417,"created_at":"2021-03-26T17:42:15.556+08:00","updated_at":"2021-03-26T17:42:15.556+08:00"},{"id":4350480,"file_name":"p_2.png","project_id":235725,"asset_id":330418,"created_at":"2021-03-26T17:42:15.558+08:00","updated_at":"2021-03-26T17:42:15.558+08:00"},{"id":4350483,"file_name":"p_5.png","project_id":235725,"asset_id":330421,"created_at":"2021-03-26T17:42:16.640+08:00","updated_at":"2021-03-26T17:42:16.640+08:00"},{"id":4350484,"file_name":"success.png","project_id":235725,"asset_id":330422,"created_at":"2021-03-26T17:42:16.641+08:00","updated_at":"2021-03-26T17:42:16.641+08:00"},{"id":4350485,"file_name":"timesup.png","project_id":235725,"asset_id":330423,"created_at":"2021-03-26T17:42:17.902+08:00","updated_at":"2021-03-26T17:42:17.902+08:00"},{"id":4350477,"file_name":"mom_1.png","project_id":235725,"asset_id":330415,"created_at":"2021-03-26T17:42:14.971+08:00","updated_at":"2021-03-26T17:42:14.971+08:00"},{"id":4350478,"file_name":"p_0.png","project_id":235725,"asset_id":330416,"created_at":"2021-03-26T17:42:14.972+08:00","updated_at":"2021-03-26T17:42:14.972+08:00"},{"id":4350481,"file_name":"p_3.png","project_id":235725,"asset_id":330419,"created_at":"2021-03-26T17:42:16.095+08:00","updated_at":"2021-03-26T17:42:16.095+08:00"},{"id":4350482,"file_name":"p_4.png","project_id":235725,"asset_id":330420,"created_at":"2021-03-26T17:42:16.097+08:00","updated_at":"2021-03-26T17:42:16.097+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦