{"id":332597,"student_id":10,"content":"setBackdrop('bg.png'); //設定背景圖\nlet board = createSprite('board.png'); //計分板\nlet koding = createSprite('k_0.png', 'k_1.png', 'k_2.png'); //玩家\nlet info = createSprite('info.png'); //遊戲說明\nlet target = createSprite('t_0.png');\nlet sight = createSprite('sight.png'); // 準星\n\nlet score = 0; //分數\nlet clock = 0; //紀錄遊戲迴圈的執行次數\n\ninfo.hidden = true; //預設隱藏\n\ntarget.direction = Math.random()*360; //目標物朝向隨機方向\ntarget.stepForward(1000 + Math.random() * 500); //目標物向前移動 1000 - 1500 的距離\ntarget.direction += 180; //目標物 180 度旋轉方向\n\n// 遊戲迴圈\nfunction gameloop () {\n drawText(score, 200, 60, 'white', 50); //顯示攔截數\n \n target.stepForward(5 + score * 0.2);\n \n // 讓準星跟著滑鼠移動\n sight.x = cursor.x;\n sight.y = cursor.y;\n \n if (target.touched(koding) == true) {\n stop();\n }\n}\n\n// 當遊戲場景被點擊時\nfunction clickOnStage () {\n if (target.touched(sight) == true) {\n target.x = 600\n target.y = 450\n target.direction = Math.random()*360;\n target.stepForward(1000 + Math.random() * 500);\n target.direction += 180;\n score += 1\n }\n}\n\non('click', clickOnStage); //遊戲場景被點擊就執行 clickOnStage\nforever(gameloop); //不斷執行遊戲迴圈\n\n","created_at":"2022-01-06T12:48:41.612+08:00","updated_at":"2022-01-19T23:24:13.264+08:00","name":"守護演唱會(預設版)","language":"javascript","screenshot":{"url":"https://cdn3.koding.school/uploads/project/screenshot/332597/72d86f2d188dc40849ed75df8f1b0549.jpg"},"parent_id":2,"plugin":"Game.set({ width: 1200, height: 900 });","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":173,"hashid":"gk4sk3zn6","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":7137612,"file_name":"t_6.png","project_id":332597,"asset_id":462466,"created_at":"2022-01-10T15:06:01.073+08:00","updated_at":"2022-01-10T15:06:01.073+08:00"},{"id":7137613,"file_name":"fail.mp3","project_id":332597,"asset_id":462467,"created_at":"2022-01-10T15:06:01.077+08:00","updated_at":"2022-01-10T15:06:01.077+08:00"},{"id":7137614,"file_name":"t_2.png","project_id":332597,"asset_id":462468,"created_at":"2022-01-10T15:06:01.081+08:00","updated_at":"2022-01-10T15:06:01.081+08:00"},{"id":7137615,"file_name":"t_0.png","project_id":332597,"asset_id":462469,"created_at":"2022-01-10T15:06:01.085+08:00","updated_at":"2022-01-10T15:06:01.085+08:00"},{"id":7137616,"file_name":"bg_end.png","project_id":332597,"asset_id":462470,"created_at":"2022-01-10T15:06:01.090+08:00","updated_at":"2022-01-10T15:06:01.090+08:00"},{"id":7137617,"file_name":"bg.png","project_id":332597,"asset_id":462471,"created_at":"2022-01-10T15:06:01.097+08:00","updated_at":"2022-01-10T15:06:01.097+08:00"},{"id":7137618,"file_name":"board.png","project_id":332597,"asset_id":462472,"created_at":"2022-01-10T15:06:01.101+08:00","updated_at":"2022-01-10T15:06:01.101+08:00"},{"id":7137619,"file_name":"info.png","project_id":332597,"asset_id":462473,"created_at":"2022-01-10T15:06:01.105+08:00","updated_at":"2022-01-10T15:06:01.105+08:00"},{"id":7137620,"file_name":"k_0.png","project_id":332597,"asset_id":462474,"created_at":"2022-01-10T15:06:01.109+08:00","updated_at":"2022-01-10T15:06:01.109+08:00"},{"id":7137621,"file_name":"k_1.png","project_id":332597,"asset_id":462475,"created_at":"2022-01-10T15:06:01.113+08:00","updated_at":"2022-01-10T15:06:01.113+08:00"},{"id":7137622,"file_name":"sight.png","project_id":332597,"asset_id":462476,"created_at":"2022-01-10T15:06:01.117+08:00","updated_at":"2022-01-10T15:06:01.117+08:00"},{"id":7137623,"file_name":"bgm.mp3","project_id":332597,"asset_id":462477,"created_at":"2022-01-10T15:06:01.159+08:00","updated_at":"2022-01-10T15:06:01.159+08:00"},{"id":7137624,"file_name":"fired.mp3","project_id":332597,"asset_id":462478,"created_at":"2022-01-10T15:06:01.163+08:00","updated_at":"2022-01-10T15:06:01.163+08:00"},{"id":7137607,"file_name":"k_2.png","project_id":332597,"asset_id":462461,"created_at":"2022-01-10T15:06:01.053+08:00","updated_at":"2022-01-10T15:06:01.053+08:00"},{"id":7137608,"file_name":"t_1.png","project_id":332597,"asset_id":462462,"created_at":"2022-01-10T15:06:01.057+08:00","updated_at":"2022-01-10T15:06:01.057+08:00"},{"id":7137609,"file_name":"t_3.png","project_id":332597,"asset_id":462463,"created_at":"2022-01-10T15:06:01.061+08:00","updated_at":"2022-01-10T15:06:01.061+08:00"},{"id":7137610,"file_name":"t_4.png","project_id":332597,"asset_id":462464,"created_at":"2022-01-10T15:06:01.065+08:00","updated_at":"2022-01-10T15:06:01.065+08:00"},{"id":7137611,"file_name":"t_5.png","project_id":332597,"asset_id":462465,"created_at":"2022-01-10T15:06:01.069+08:00","updated_at":"2022-01-10T15:06:01.069+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦