{"id":193667,"student_id":10,"content":"Game.set({width: 1200, height: 900})\n\nground = createSprite('bg.png')\ndino = createSprite('dino_0.png', 'dino_1.png')\nb1 = createSprite('1.png', '2.png', '3.png', '4.png', '5.png')\nb2 = createSprite('1.png', '2.png', '3.png', '4.png', '5.png')\nhint = createSprite(\"hint.png\")\nboard = createSprite(\"board.png\")\n\ndino.x = 300\ndino.y = 600\nb1.x = 1800\nb1.y = 620\nb2.x = 2400\nb2.y = 620\n\nvy = 0\nscore = 0\nspeed = 10\n\nhint.y += 300\n\ncreateSound(\"bgm.mp3\", true)\n\nfunction loop() {\n \n if (hint.hidden) {\n ground.x -= speed\n b1.x -= speed * 1.25\n b2.x -= speed * 1.25\n dino.costumeId = Math.floor(score) % 2\n }\n\n \n if (ground.x \u003c= -1200) {\n ground.x += 3000\n }\n \n if (b1.x \u003c -50) {\n b1.x = b2.x + Math.random() *200 * speed / 10 + 600\n b1.costume_id = Math.floor(Math.random() * 5)\n }\n \n if (b2.x \u003c -50) {\n b2.x = b1.x + Math.random() *200 * speed / 10 + 600\n b2.costume_id = Math.floor(Math.random() * 5)\n }\n \n if (key.space \u0026\u0026 dino.y == 600) {\n vy = -30\n // create_sound(\"jump.ogg\")\n }\n \n vy += 2\n dino.y += vy\n \n if (dino.y \u003e 600) {\n dino.y = 600\n }\n \n if (dino.touched(b1) || dino.touched(b2)) {\n hint.hidden = false\n }\n \n if (hint.hidden) {\n score += 1/6\n speed = 10 + score/100\n }\n \n if (key.enter) {\n hint.hidden = true\n b1.x = 1800\n b2.x = 2400\n speed = 10\n score = 0\n }\n \n if (score % 200 \u003e 100) {\n setBackdrop(\"black\")\n }\n else {\n setBackdrop(\"white\")\n }\n\n drawText(Math.floor(score), 40, 40, 'black', 60)\n\n}\n\nforever(loop)\n","created_at":"2020-09-21T11:58:28.097+08:00","updated_at":"2020-09-21T12:04:45.061+08:00","name":"w","language":"javascript","screenshot":{"url":"https://cdn1.koding.school/uploads/project/screenshot/193667/3bb0849a77d5e12677122a19ab2aecaf.jpg"},"parent_id":2,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":216,"hashid":"yeyse8g5","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3311989,"file_name":"dino_1.png","project_id":193667,"asset_id":264585,"created_at":"2020-09-21T11:58:47.291+08:00","updated_at":"2020-09-21T11:58:47.291+08:00"},{"id":3311990,"file_name":"hint.png","project_id":193667,"asset_id":264586,"created_at":"2020-09-21T11:58:47.293+08:00","updated_at":"2020-09-21T11:58:47.293+08:00"},{"id":3311985,"file_name":"5.png","project_id":193667,"asset_id":264581,"created_at":"2020-09-21T11:58:46.015+08:00","updated_at":"2020-09-21T11:58:46.015+08:00"},{"id":3311986,"file_name":"bg.png","project_id":193667,"asset_id":264582,"created_at":"2020-09-21T11:58:46.018+08:00","updated_at":"2020-09-21T11:58:46.018+08:00"},{"id":3311991,"file_name":"board.png","project_id":193667,"asset_id":264588,"created_at":"2020-09-21T12:03:38.723+08:00","updated_at":"2020-09-21T12:03:38.723+08:00"},{"id":3311983,"file_name":"3.png","project_id":193667,"asset_id":264579,"created_at":"2020-09-21T11:58:44.839+08:00","updated_at":"2020-09-21T11:58:44.839+08:00"},{"id":3311984,"file_name":"4.png","project_id":193667,"asset_id":264580,"created_at":"2020-09-21T11:58:44.842+08:00","updated_at":"2020-09-21T11:58:44.842+08:00"},{"id":3311979,"file_name":"_bg.png","project_id":193667,"asset_id":264575,"created_at":"2020-09-21T11:58:43.638+08:00","updated_at":"2020-09-21T11:58:43.638+08:00"},{"id":3311980,"file_name":"0.png","project_id":193667,"asset_id":264576,"created_at":"2020-09-21T11:58:43.640+08:00","updated_at":"2020-09-21T11:58:43.640+08:00"},{"id":3311988,"file_name":"dino_0.png","project_id":193667,"asset_id":264584,"created_at":"2020-09-21T11:58:46.663+08:00","updated_at":"2020-09-21T11:58:46.663+08:00"},{"id":3311981,"file_name":"1.png","project_id":193667,"asset_id":264577,"created_at":"2020-09-21T11:58:44.232+08:00","updated_at":"2020-09-21T11:58:44.232+08:00"},{"id":3311982,"file_name":"2.png","project_id":193667,"asset_id":264578,"created_at":"2020-09-21T11:58:44.234+08:00","updated_at":"2020-09-21T11:58:44.234+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦