{"id":23690,"student_id":1444,"content":"setBackdrop('black');\n\n// 創造天花板\nvar ceiling = createSprite(\"https://sb.koding.school/project_assets/20023639b47e88c2d230ef35c2a261a1.png\");\nceiling.x = 320;\nceiling.y = 8;\nceiling.layer = 1;\n\n// 創造左右牆壁\nvar left_wall = createSprite(\"wall.png\");\nvar right_wall = createSprite(\"wall.png\");\nleft_wall.x = 130;\nright_wall.x = 510;\n\n// 創造玩家\nvar player = createSprite([\"player_1.png\",\"player_2.png\",\"player_3.png\",\"player_4.png\",\"player_5.png\"]);\nplayer.y = 50;\n//---------------------------------------------------------------//\n\nvar stairs = [];\nvar vy = 0;\nvar life = 10;\nvar floor = 0;\nvar lastTime = 0;\nvar hit;\n\nfor(var i=0; i\u003c8; i++) {\n var stair = createSprite([\"conveyor_left.png\",\"conveyor_right.png\",\"normal.png\",\"nails.png\",\"trampoline.png\",\"fake.png\"]);\n\tstair.x = Math.random()*290 + 185;\n stair.y = i*80 + 640;\n stair.costumeId = Math.floor(Math.random()*6);\n stairs.push(stair);\n}\nvar clock = 0;\n// forever(function() {\n// setBackdrop('black');\n// if(hit) {\n// setBackdrop('red');\n// hit = false;\n// }\n// \tif (key.left \u0026\u0026 !player.touched(left_wall)) {\n// \tplayer.x -= 3;\n// }\n// if (key.right \u0026\u0026 !player.touched(right_wall)) {\n// \tplayer.x += 3;\n// }\n// if (!player.touched(stairs)) {\n// vy += 0.1;\n// }\n\n // clock++;\n // if (clock%6 == 0) {\n // if (key.right) {\n // if (player.costumeId == 1) {\n // player.costumeId = 2;\n // } else {\n // player.costumeId = 1;\n // }\n // }\n\n // if (key.left) {\n // if (player.costumeId == 3) {\n // player.costumeId = 4;\n // } else {\n // player.costumeId = 3;\n // }\n // }\n // }\n\n // if (key.right == false \u0026\u0026 key.left == false) {\n // player.costumeId = 0;\n // }\n\n // player.y += vy;\n\n // for (var i=0; i\u003cstairs.length; i++) {\n // \tstairs[i].y -= 2;\n // if(stairs[i].y \u003c -10) {\n // stairs[i].costumeId = Math.floor(Math.random()*5);\n // \tstairs[i].y += 640;\n // stairs[i].hidden = false;\n // floor += 1;\n // // }\n // }\n // if (life \u003c= 0 || player.y \u003e 480) {\n // \tsetBackdrop('red');\n // stop();\n // }\n // var time = Date.now();\n // if (player.touched(ceiling) \u0026\u0026 time - lastTime \u003e 3000) {\n // life -= 3;\n // lastTime = time;\n // hit = true;\n // vy = 0;\n // }\n // print(floor, 370, 10, 'red', 20);\n // print(life, 10, 10, 'red', 20);\n// });\n\n// player.when('touch',stairs, function(s) {\n// if(player.y \u003e s.y) {\n// return;\n// }\n// vy = 0;\n// player.y = s.y - 20;\n// \tif(s.costumeId == 0) {\n// \tplayer.x -= 2;\n// }\n// if(s.costumeId == 1) {\n// \tplayer.x += 2;\n// }\n// if(s.costumeId == 4) {\n// vy = -7;\n// }\n// if(s.costumeId == 2 \u0026\u0026 s !== player.touchOn) {\n// \tlife += 1;\n// }\n// if(s.costumeId == 3 \u0026\u0026 s !== player.touchOn) {\n// \tlife -= 3;\n// hit = true;\n// }\n// if(s.costumeId == 5 \u0026\u0026 s !== player.touchOn) {\n// setTimeout(function() {\n// s.hidden = true\n// }, 300);\n// }\n// player.touchOn = s;\n// });","created_at":"2018-03-06T23:45:27.088+08:00","updated_at":"2021-01-22T00:44:50.615+08:00","name":"小朋友下樓梯","language":"javascript","screenshot":{"url":"https://cdn8.koding.school/uploads/project/screenshot/23690/95db9317e6f3a179a75ae7a77e3bdfb4.jpg"},"parent_id":2,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":112,"hashid":"5j3s3zm3","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":450457,"file_name":"conveyor_left.png","project_id":23690,"asset_id":55066,"created_at":"2018-03-06T23:47:18.045+08:00","updated_at":"2018-03-06T23:47:18.045+08:00"},{"id":450458,"file_name":"conveyor_right.png","project_id":23690,"asset_id":55067,"created_at":"2018-03-06T23:47:18.052+08:00","updated_at":"2018-03-06T23:47:18.052+08:00"},{"id":450459,"file_name":"fake.png","project_id":23690,"asset_id":55068,"created_at":"2018-03-06T23:47:18.058+08:00","updated_at":"2018-03-06T23:47:18.058+08:00"},{"id":450460,"file_name":"normal.png","project_id":23690,"asset_id":55069,"created_at":"2018-03-06T23:47:18.065+08:00","updated_at":"2018-03-06T23:47:18.065+08:00"},{"id":450461,"file_name":"trampoline.png","project_id":23690,"asset_id":55070,"created_at":"2018-03-06T23:47:18.072+08:00","updated_at":"2018-03-06T23:47:18.072+08:00"},{"id":450462,"file_name":"nails.png","project_id":23690,"asset_id":55071,"created_at":"2018-03-06T23:47:18.079+08:00","updated_at":"2018-03-06T23:47:18.079+08:00"},{"id":450463,"file_name":"ceiling.png","project_id":23690,"asset_id":55072,"created_at":"2018-03-06T23:47:18.087+08:00","updated_at":"2018-03-06T23:47:18.087+08:00"},{"id":450464,"file_name":"wall.png","project_id":23690,"asset_id":55073,"created_at":"2018-03-06T23:47:18.094+08:00","updated_at":"2018-03-06T23:47:18.094+08:00"},{"id":450465,"file_name":"player_3.png","project_id":23690,"asset_id":55074,"created_at":"2018-03-06T23:47:18.101+08:00","updated_at":"2018-03-06T23:47:18.101+08:00"},{"id":450466,"file_name":"player_4.png","project_id":23690,"asset_id":55075,"created_at":"2018-03-06T23:47:18.116+08:00","updated_at":"2018-03-06T23:47:18.116+08:00"},{"id":450467,"file_name":"player_2.png","project_id":23690,"asset_id":55076,"created_at":"2018-03-06T23:47:18.124+08:00","updated_at":"2018-03-06T23:47:18.124+08:00"},{"id":450468,"file_name":"player_5.png","project_id":23690,"asset_id":55077,"created_at":"2018-03-06T23:47:18.130+08:00","updated_at":"2018-03-06T23:47:18.130+08:00"},{"id":450469,"file_name":"player_1.png","project_id":23690,"asset_id":55078,"created_at":"2018-03-06T23:47:18.137+08:00","updated_at":"2018-03-06T23:47:18.137+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦