{"id":23860,"student_id":3341,"content":"var heroName = \"\";\nvar heroHP = -90;\n\nheroName = \"超級\"+heroName;\nheroHP = heroHP+10;\nheroDead =\"false\"\nif (heroDead) {\n console.log(\"遊戲結束...\");}\n if (heroDead) {\n \n} else {\n console.log(\"很好!\");\n}\nheroDead = heroHP\u003c=0;\nvar heroStatus = \"fighting\"; // 主角的狀態\nif (heroStatus===\"fighting\") {\n heroHP = heroHP-10;\n}\nif (heroStatus===\"sleeping\") {\n heroHP = heroHP+10;\n}\nif (heroStatus===\"fighting\") {\n heroHP = heroHP-10;\n} else if (heroStatus===\"sleeping\" \u0026\u0026 heroHP\u003c100) {\n heroHP = heroHP+10;\n} else {\n console.log(\"狀態有誤!\");\n}\n","created_at":"2018-03-08T15:53:02.590+08:00","updated_at":"2019-11-08T17:39:44.547+08:00","name":"JS Game L3","language":"javascript","screenshot":{"url":"https://cdn1.koding.school/uploads/project/screenshot/23860/89edcce60b8890776f43b51e69f48ea4.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":82,"hashid":"2pdsrerp","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":452307,"file_name":"hero.png","project_id":23860,"asset_id":15664,"created_at":"2018-03-08T15:53:02.617+08:00","updated_at":"2018-03-08T15:53:02.617+08:00"},{"id":452308,"file_name":"console-box.png","project_id":23860,"asset_id":15665,"created_at":"2018-03-08T15:53:02.624+08:00","updated_at":"2018-03-08T15:53:02.624+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦