{"id":27709,"student_id":10,"content":"// 遊戲開始的時間點\nvar startTime = Date.now();\n\nforever(function(){\n\n // 遊戲當前的時間點\n var currentTime = Date.now();\n \n // 遊戲經過的時間,現在時間減去開始時間\n var passTime = currentTime - startTime;\n \n // 計算剩下時間\n var countDown = Math.ceil((1000*10 - passTime)/1000);\n \n if (passTime \u003c 1000*10) {\n print(`遊戲倒數 ${countDown} 秒`, 200, 200, \"black\", 40);\n } else {\n print(\"遊戲時間到!!\", 200, 200, \"black\", 40);\n }\n});","created_at":"2018-04-30T10:02:18.323+08:00","updated_at":"2019-10-18T09:51:40.502+08:00","name":"計時器範例","language":"javascript","screenshot":{"url":"https://cdn0.koding.school/uploads/project/screenshot/27709/d89cf0c024c2f6ce62e32127f75c858f.jpg"},"parent_id":2,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":331,"hashid":"5j3s3gye","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":510690,"file_name":"1.svg","project_id":27709,"asset_id":7,"created_at":"2018-04-30T10:02:18.336+08:00","updated_at":"2018-04-30T10:02:18.336+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦