{"id":315516,"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 target = createSprite('t_0.png', 't_1.png', 't_2.png', 't_3.png', 't_4.png', 't_5.png', 't_6.png'); //目標物\nlet info = createSprite('info.png'); //遊戲說明\nlet sight = createSprite('sight.png');\n\nlet score = 0; //分數\nlet clock = 0; //紀錄遊戲迴圈的執行次數\n\ntarget.direction = Math.random()*360; //目標物朝向隨機方向\ntarget.stepForward(1000 + Math.random() * 500); //目標物向前移動 1000 - 1500 的距離\ntarget.direction += 180; //目標物 180 度旋轉方向\ntarget.costumeId = Math.floor(Math.random() * 7);\n\n// 遊戲迴圈\nfunction gameloop () {\n drawText(score, 200, 60, 'white', 50); //顯示攔截數\n \n if (info.hidden == true) {\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 setBackdrop('bg_end.png');\n koding.costumeId = 2;\n stop();\n }\n \n clock += 1;\n if (clock % 30 == 0) {\n koding.costumeId = 0;\n }\n if (clock % 30 == 15) {\n koding.costumeId = 1;\n }\n}\n\n// 當遊戲場景被點擊時\nfunction clickOnStage () {\n \n info.hidden = true;\n \n if (target.touched(sight) == true) {\n let clone = createSprite('t_0.png', 't_1.png', 't_2.png', 't_3.png', 't_4.png', 't_5.png', 't_6.png');\n clone.x = target.x;\n clone.y = target.y;\n clone.costumeId = target.costumeId;\n clone.direction = target.direction;\n clone.opacity = 0.5;\n \n target.x = 600;\n target.y = 450;\n target.direction = Math.random()*360; //目標物朝向隨機方向\n target.stepForward(1000 + Math.random() * 500); //目標物向前移動 1000 - 1500 的距離\n target.direction += 180; //目標物 180 度旋轉方向\n target.costumeId = Math.floor(Math.random() * 7);\n score += 1;\n }\n}\n\non('click', clickOnStage); //遊戲場景被點擊就執行 clickOnStage\nforever(gameloop); //不斷執行遊戲迴圈\n\n\n","created_at":"2021-11-19T11:11:54.102+08:00","updated_at":"2021-12-15T12:37:40.099+08:00","name":"守護演唱會(預設版)","language":"javascript","screenshot":{"url":"https://cdn1.koding.school/uploads/project/screenshot/315516/c10ae8c43b33c18a786da77cc2159840.jpg"},"parent_id":2,"plugin":"Game.set({ width: 1200, height: 900 });","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":162,"hashid":"zpesj2jg6","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":6845650,"file_name":"fired.mp3","project_id":315516,"asset_id":450747,"created_at":"2021-12-13T23:45:25.919+08:00","updated_at":"2021-12-13T23:45:25.919+08:00"},{"id":6845651,"file_name":"bgm.mp3","project_id":315516,"asset_id":450748,"created_at":"2021-12-13T23:45:25.938+08:00","updated_at":"2021-12-13T23:45:25.938+08:00"},{"id":6845652,"file_name":"sight.png","project_id":315516,"asset_id":450749,"created_at":"2021-12-13T23:45:25.942+08:00","updated_at":"2021-12-13T23:45:25.942+08:00"},{"id":6845653,"file_name":"k_1.png","project_id":315516,"asset_id":450750,"created_at":"2021-12-13T23:45:25.946+08:00","updated_at":"2021-12-13T23:45:25.946+08:00"},{"id":6845654,"file_name":"k_0.png","project_id":315516,"asset_id":450751,"created_at":"2021-12-13T23:45:25.950+08:00","updated_at":"2021-12-13T23:45:25.950+08:00"},{"id":6845655,"file_name":"info.png","project_id":315516,"asset_id":450752,"created_at":"2021-12-13T23:45:25.955+08:00","updated_at":"2021-12-13T23:45:25.955+08:00"},{"id":6845656,"file_name":"board.png","project_id":315516,"asset_id":450753,"created_at":"2021-12-13T23:45:25.959+08:00","updated_at":"2021-12-13T23:45:25.959+08:00"},{"id":6845657,"file_name":"bg.png","project_id":315516,"asset_id":450754,"created_at":"2021-12-13T23:45:25.965+08:00","updated_at":"2021-12-13T23:45:25.965+08:00"},{"id":6845658,"file_name":"bg_end.png","project_id":315516,"asset_id":450755,"created_at":"2021-12-13T23:45:25.971+08:00","updated_at":"2021-12-13T23:45:25.971+08:00"},{"id":6845659,"file_name":"t_0.png","project_id":315516,"asset_id":450756,"created_at":"2021-12-13T23:45:25.974+08:00","updated_at":"2021-12-13T23:45:25.974+08:00"},{"id":6845660,"file_name":"t_2.png","project_id":315516,"asset_id":450757,"created_at":"2021-12-13T23:45:25.978+08:00","updated_at":"2021-12-13T23:45:25.978+08:00"},{"id":6845661,"file_name":"fail.mp3","project_id":315516,"asset_id":450758,"created_at":"2021-12-13T23:45:25.982+08:00","updated_at":"2021-12-13T23:45:25.982+08:00"},{"id":6845662,"file_name":"t_6.png","project_id":315516,"asset_id":450759,"created_at":"2021-12-13T23:45:25.985+08:00","updated_at":"2021-12-13T23:45:25.985+08:00"},{"id":6845663,"file_name":"t_5.png","project_id":315516,"asset_id":450760,"created_at":"2021-12-13T23:45:25.989+08:00","updated_at":"2021-12-13T23:45:25.989+08:00"},{"id":6845664,"file_name":"t_4.png","project_id":315516,"asset_id":450761,"created_at":"2021-12-13T23:45:25.992+08:00","updated_at":"2021-12-13T23:45:25.992+08:00"},{"id":6845665,"file_name":"t_3.png","project_id":315516,"asset_id":450762,"created_at":"2021-12-13T23:45:25.996+08:00","updated_at":"2021-12-13T23:45:25.996+08:00"},{"id":6845666,"file_name":"t_1.png","project_id":315516,"asset_id":450763,"created_at":"2021-12-13T23:45:26.000+08:00","updated_at":"2021-12-13T23:45:26.000+08:00"},{"id":6845667,"file_name":"k_2.png","project_id":315516,"asset_id":450764,"created_at":"2021-12-13T23:45:26.003+08:00","updated_at":"2021-12-13T23:45:26.003+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦