{"id":238246,"student_id":10,"content":"setBackdrop(\"black\"); //設定背景圖\nlet koding = createSprite('koding.png'); //創造叩叮\nlet balls = []; //存放雪球的陣列\nkoding.y = 600;\n\n// 創造 1000 個雪球\nlet i = 0;\nwhile (i \u003c 1000) {\n let b = createSprite('ball.png');\n b.x = Math.random() * 1200;\n b.y = Math.random() * 900;\n b.opacity = Math.random();\n b.scale = Math.random();\n balls.push(b);\n i++;\n}\n\nfunction gameloop () {\n // let i = 0;\n // while (i \u003c 1000) {\n for(let i=0; i\u003c1000; i++) {\n let b = balls[i];\n b.x += 2;\n b.y += 3;\n if (b.y \u003e 900) {\n b.y = 0;\n }\n if (b.x \u003e 1200) {\n b.x = 0;\n }\n }\n}\n\nforever(gameloop); //重複不斷執行遊戲迴圈","created_at":"2021-03-26T09:28:14.315+08:00","updated_at":"2021-03-26T11:41:04.322+08:00","name":"下雪","language":"javascript","screenshot":{"url":"https://cdn9.koding.school/uploads/project/screenshot/238246/10a1e843ec4a7e2e7ca5a10ee1aee50e.jpg"},"parent_id":2,"plugin":"Game.set({width: 1200, height: 900})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":196,"hashid":"gk4sk8v5k","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":4349323,"file_name":"ball.png","project_id":238246,"asset_id":330401,"created_at":"2021-03-26T09:31:51.329+08:00","updated_at":"2021-03-26T09:31:51.329+08:00"},{"id":4349322,"file_name":"koding.png","project_id":238246,"asset_id":330400,"created_at":"2021-03-26T09:28:40.788+08:00","updated_at":"2021-03-26T09:28:46.368+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦