{"id":305117,"student_id":3469,"content":"setBackdrop(\"bg.jpg\");\nvar bird = createSprite(\"bird.png\");\nbird.x = 320;\nbird.y = 200;\nvar tube = createSprite('tube.png');\nvar tube2 = createSprite('tube.png');\ntube.x = 660;\ntube.y = 240;\ntube2.x = 660;\ntube2.y = 240;\nvar ground = createSprite({\n x: 320,\n y: 480,\n scale: 1, // 1.2倍大\n costumes: [\"ground.jpg\"]\n});\n\nvar vy = 0;\nvar score = 0;\nvar gotScore = false;\nvar gotScore2 = false;\nvar tubeY = 0;\n\nforever(function() {\n /* Do this every tick */\n tube.x -= 5;\n tube2.x -= 5.5;\n vy += 0.25;\n bird.y += vy;\n if (tube.x \u003c= -40) {\n tube.x = 640;\n tube.y = tubeY + Math.random() * 150;\n gotScore = false;\n tubeY = Math.random() * 150;\n }\n if (tube2.x \u003c= -40) {\n tube2.x = 640;\n tube2.y = tubeY + Math.random() * 150;\n gotScore2 = false;\n }\n if (tube.x \u003c 300 \u0026\u0026 gotScore == false) {\n score += 1;\n gotScore = true;\n }\n if (tube2.x \u003c 300 \u0026\u0026 gotScore2 == false) {\n score += 1;\n gotScore2 = true;\n }\n print(\"score: \" + score);\n});\n\nwhen(\"click\", function() {\n vy = -6;\n});\n\n// bird.when(\"touch\", tube, function() {\n// stop();\n// });\n\n// bird.when(\"touch\", tube2, function() {\n// stop();\n// });\n\n// bird.when(\"touch\", ground, function() {\n// stop();\n// });","created_at":"2021-10-16T14:43:15.736+08:00","updated_at":"2021-10-16T15:16:14.768+08:00","name":"Flappy Bird.jsa 副本","language":"javascript","screenshot":{"url":"https://cdn1.koding.school/uploads/project/screenshot/305117/555b9c63ddcc07388cf0f4c54ab99a12.jpg"},"parent_id":4696,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":78,"hashid":"npms392pk","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":6203489,"file_name":"bird.png","project_id":305117,"asset_id":15647,"created_at":"2021-10-16T14:43:15.748+08:00","updated_at":"2021-10-16T14:43:15.748+08:00"},{"id":6203490,"file_name":"bg.jpg","project_id":305117,"asset_id":15648,"created_at":"2021-10-16T14:43:15.751+08:00","updated_at":"2021-10-16T14:43:15.751+08:00"},{"id":6203491,"file_name":"ground.jpg","project_id":305117,"asset_id":15649,"created_at":"2021-10-16T14:43:15.752+08:00","updated_at":"2021-10-16T14:43:15.752+08:00"},{"id":6203492,"file_name":"tube.png","project_id":305117,"asset_id":15650,"created_at":"2021-10-16T14:43:15.753+08:00","updated_at":"2021-10-16T14:43:15.753+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦