{"id":185704,"student_id":10,"content":"","created_at":"2020-08-26T14:13:09.105+08:00","updated_at":"2020-08-26T14:13:15.962+08:00","name":"Q-learning 小恐龍 副本","language":"javascript","screenshot":{"url":null},"parent_id":49551,"plugin":"var score = 0;\nvar bestScore = 0;\nvar dinosaur = createSprite('dinosaur.png');\ndinosaur.scale = 0.4;\ndinosaur.x = 100;\ndinosaur.speed = 3;\n\ndinosaur.v = 0;\n\ndinosaur.forever(function(){\n dinosaur.y -= dinosaur.v;\n dinosaur.v -= 0.4;\n if (dinosaur.y \u003e 240) {\n dinosaur.y = 240;\n }\n});\n\nwhen('click', function () {\n dinosaur.v = 9; \n});\n\n\nvar tree = createSprite('tree.png');\ntree.scale = 0.6;\ntree.x = 640;\ntree.forever(function () {\n tree.x -= dinosaur.speed;\n if (tree.x \u003c -10) {\n tree.x += 670;\n tree.scale = Math.random()+0.\n }\n});\n\nforever(function(){\n score++;\n if (score \u003e bestScore) bestScore = score;\n print('score:' + score, 10, 10);\n print('best:' + bestScore, 10, 30);\n print('speed:' + dinosaur.speed, 10, 50);\n // dinosaur.speed = Math.floor(score/1000) + 4\n});\n\nfunction jump () {\n dinosaur.v = 9;\n}\n\nfunction restart () {\n tree.x = 640;\n score = 0;\n dinosaur.speed = 3;\n dinosaur.y = 240;\n dinosaur.v = 0;\n}","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":247,"hashid":"2pdsd9r9","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3154109,"file_name":"tree.png","project_id":185704,"asset_id":28784,"created_at":"2020-08-26T14:13:09.112+08:00","updated_at":"2020-08-26T14:13:09.112+08:00"},{"id":3154110,"file_name":"dinosaur.png","project_id":185704,"asset_id":28779,"created_at":"2020-08-26T14:13:09.114+08:00","updated_at":"2020-08-26T14:13:09.114+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦