{"id":28321,"student_id":3469,"content":"var heroName = \"蘋果\";\nvar heroHP = 90;\nvar herpDead = heroHP \u003c= 0;\nheroName = \"超級\"+heroName;\nheroHP = heroHP+10;\nheroDead = heroHP \u003c= 0;\nvar heroStatus = \"fighting\"; // 主角的狀態\nif (heroStatus === \"fighting\") {\n heroHP = heroHP-10;\n} else if (heroStatus === \"sleeping\" \u0026\u0026 heroHP \u003c 100) {\n heroHP = heroHP+10;\n} else {\n console.log(\"狀態有誤!\");\n}\nif (heroDead) {\n console.log('遊戲結束…');\n} else {\n console.log('很好!');\n}","created_at":"2018-05-10T22:04:38.662+08:00","updated_at":"2020-08-16T16:59:44.801+08:00","name":"JS Game L3","language":"javascript","screenshot":{"url":"https://cdn2.koding.school/uploads/project/screenshot/28321/717005cf4546fdb8e07fcbac05ca7ef7.jpg"},"parent_id":4706,"plugin":"setBackdrop(\"#5ea642\");\nvar hero = createSprite(\"hero.png\");\nvar box = createSprite(\"console-box.png\");\nhero.scale = 0.2;\nbox.y=380;\n\nvar heroName = heroName || \"請輸入主角名稱\";\nvar heroHP = heroHP || \"\";\nvar heroStatus = heroStatus || \"\";\n\nvar originConsoleLog = console.log;\nvar logs = [];\nconsole.log = function(log){\n\tlogs.push(log);\n if(logs.length\u003e5){logs.shift();}\n originConsoleLog(log);\n};\n\nforever(function(){\n\tprint(heroName, 20, 20, \"white\", 18);\n\tprint(\"生命: \" + heroHP, 20, 48);\n\tprint(\"狀態: \" + heroStatus, 20, 68);\n for(var i=logs.length-1;i\u003e=0;i--){\n\t print(logs[i], 64, 330+20*i, \"white\",14); \n }\n});","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":124,"hashid":"kdms86ye","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":522202,"file_name":"hero.png","project_id":28321,"asset_id":15664,"created_at":"2018-05-10T22:04:38.668+08:00","updated_at":"2018-05-10T22:04:38.668+08:00"},{"id":522203,"file_name":"console-box.png","project_id":28321,"asset_id":15665,"created_at":"2018-05-10T22:04:38.670+08:00","updated_at":"2018-05-10T22:04:38.670+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦