{"id":30374,"student_id":3339,"content":"setBackdrop(\"bg.jpg\");\n\nvar topSpike = createSprite(\"topSpike.png\");\ntopSpike.y = 35;\n\nvar downSpike = createSprite(\"downSpike.png\");\ndownSpike.y = 445;\n\nvar bird = createSprite(\"bird.png\");\nbird.rotationStyle = \"flipped\";\n\nvar firsSpikeY = 80;\nvar leftSpikes = [];\nvar rightSpikes = [];\nvar vy = -6;\nvar score = 0;\n\nfor (var i = 0; i \u003c 5; i++) {\n var rightSpike = createSprite({\n x: 455,\n y: firsSpikeY+i*65,\n hidden: true,\n costumes: \"rightSpike.png\"\n });\n rightSpikes.push(rightSpike);\n\n var leftSpike = createSprite({\n x: 185,\n y: firsSpikeY+i*65,\n hidden: true,\n costumes: \"leftSpike.png\"\n });\n leftSpikes.push(leftSpike);\n}\n\nwhen(\"click\", function() {\n vy = -6;\n});\n\n\n\nforever(function() {\n bird.stepForward(3);\n bird.y += vy;\n vy += 0.3;\n\n if (bird.x \u003e 440) {\n bird.direction += 180;\n score++;\n\n }\n if (bird.x \u003c 200) {\n bird.direction += 180;\n score++;\n }\n if (score \u003c 10) {\n print(score, 300, 205, \"#deebef\", 60);\n } else {\n print(score, 285, 205, \"#deebef\", 60);\n }\n});\n\nfunction showLeftSpikes() {\n for (var i = 0; i \u003c 4; i++) {\n var showSpikeIndex = Math.floor(Math.random()*5);\n leftSpikes[showSpikeIndex].hidden = false;\n }\n \n}\n\nfunction showRightSpikes() {\n for (var i = 0; i \u003c 4; i++) {\n var showSpikeIndex = Math.floor(Math.random()*5);\n rightSpikes[showSpikeIndex].hidden = false\n }\n}","created_at":"2018-05-31T14:35:01.182+08:00","updated_at":"2019-10-21T09:09:15.211+08:00","name":"快樂鳥與邪惡刺(S)","language":"javascript","screenshot":{"url":"https://cdn1.koding.school/uploads/project/screenshot/30374/0996b53be62968d70303085082f6431c.jpg"},"parent_id":11473,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":113,"hashid":"qmdsw962","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":565644,"file_name":"bg.jpg","project_id":30374,"asset_id":30282,"created_at":"2018-05-31T14:35:01.188+08:00","updated_at":"2018-05-31T14:35:01.188+08:00"},{"id":565645,"file_name":"rightSpike.png","project_id":30374,"asset_id":30283,"created_at":"2018-05-31T14:35:01.190+08:00","updated_at":"2018-05-31T14:35:01.190+08:00"},{"id":565646,"file_name":"leftSpike.png","project_id":30374,"asset_id":30284,"created_at":"2018-05-31T14:35:01.192+08:00","updated_at":"2018-05-31T14:35:01.192+08:00"},{"id":565647,"file_name":"downSpike.png","project_id":30374,"asset_id":30285,"created_at":"2018-05-31T14:35:01.193+08:00","updated_at":"2018-05-31T14:35:01.193+08:00"},{"id":565648,"file_name":"topSpike.png","project_id":30374,"asset_id":30286,"created_at":"2018-05-31T14:35:01.195+08:00","updated_at":"2018-05-31T14:35:01.195+08:00"},{"id":565649,"file_name":"bird.png","project_id":30374,"asset_id":30287,"created_at":"2018-05-31T14:35:01.196+08:00","updated_at":"2018-05-31T14:35:01.196+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦