{"id":849173,"student_id":44333,"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 sight = createSprite('sight.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 level = 0; //等級\nlet clock = 0; //紀錄遊戲迴圈的執行次數\n\nlet score = 0;\n\ntarget.direction = Math.random()*360; //物品朝向隨機方向\ntarget.stepForward(Math.random() * 300 + 1000); //物品向前移動 300 - 1300 的距離\ntarget.direction += 180; //物品 180 度旋轉方向\ntarget.costumeId = Math.floor(Math.random()*7);\n\ncreateSound('bgm.mp3', true); //播放背景音樂\n\n// 遊戲迴圈\nfunction gameloop () {\n drawText(level, 200, 60, 'white', 50); //顯示攔截數\n\n // 讓準星不斷跟著滑鼠移動\n sight.x = cursor.x;\n sight.y = cursor.y;\n \n clock++;\n if (clock % 30 == 0) {\n koding.costumeId = 1;\n }\n if (clock % 30 == 15) {\n koding.costumeId = 0;\n }\n \n if (info.hidden == true) {\n target.stepForward(5 + score * 0.2);\n }\n \n \n if (target.touched(koding)) {\n setBackdrop('bg_end.png');\n koding.costumeId = 2;\n stop();\n createSound('fail.mp3');\n }\n\n if (target.touched(koding) == true) {\n stop(); //暫停遊戲\n createSound('fail.mp3'); //播放失敗音效\n }\n}\n\n// 當遊戲場景被點擊時\nfunction clickOnStage () {\n\n if (target.touched(sight) == true) {\n \n level += 1;\n\n // 當物品被攔截時,創造一個半透明的物品作為紀錄\n let fake = createSprite('t_0.png', 't_1.png', 't_2.png', 't_3.png', 't_4.png', 't_5.png', 't_6.png');\n fake.x = target.x;\n fake.y = target.y;\n fake.direction = target.direction;\n fake.costumeId = target.costumeId;\n fake.opacity = 0.5;\n \n // 將物品重置到遊戲場景中央\n target.x = 600;\n target.y = 450;\n target.direction = Math.random()*360;\n target.stepForward(Math.random() * 300 + 1000);\n target.direction += 180;\n target.costumeId = Math.floor(Math.random()*7);\n createSound('fired.mp3');\n }\n \n info.hidden = true; //隱藏遊戲說明圖\n}\n\n\non('click', clickOnStage); //遊戲場景被點擊就執行 clickOnStage\nforever(gameloop);","created_at":"2024-09-28T10:57:43.277+08:00","updated_at":"2024-09-28T11:57:02.446+08:00","name":"守護重金屬叩叮(延伸版) 副本 副本","language":"javascript","screenshot":{"url":"https://cdn8.koding.school/uploads/project/screenshot/849173/eb3e5929e0079fbeab9ddcf552b701e0.jpg"},"parent_id":473482,"plugin":"Game.set({ width: 1200, height: 900 });","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":2,"hashid":"2pdsp5j4n","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":18637217,"file_name":"sight.png","project_id":849173,"asset_id":488853,"created_at":"2024-09-28T10:57:43.282+08:00","updated_at":"2024-09-28T10:57:43.282+08:00"},{"id":18637218,"file_name":"k_1.png","project_id":849173,"asset_id":488854,"created_at":"2024-09-28T10:57:43.283+08:00","updated_at":"2024-09-28T10:57:43.283+08:00"},{"id":18637219,"file_name":"k_0.png","project_id":849173,"asset_id":488855,"created_at":"2024-09-28T10:57:43.284+08:00","updated_at":"2024-09-28T10:57:43.284+08:00"},{"id":18637220,"file_name":"info.png","project_id":849173,"asset_id":488856,"created_at":"2024-09-28T10:57:43.285+08:00","updated_at":"2024-09-28T10:57:43.285+08:00"},{"id":18637221,"file_name":"board.png","project_id":849173,"asset_id":488857,"created_at":"2024-09-28T10:57:43.286+08:00","updated_at":"2024-09-28T10:57:43.286+08:00"},{"id":18637222,"file_name":"bg.png","project_id":849173,"asset_id":488858,"created_at":"2024-09-28T10:57:43.287+08:00","updated_at":"2024-09-28T10:57:43.287+08:00"},{"id":18637223,"file_name":"bg_end.png","project_id":849173,"asset_id":488859,"created_at":"2024-09-28T10:57:43.288+08:00","updated_at":"2024-09-28T10:57:43.288+08:00"},{"id":18637224,"file_name":"t_0.png","project_id":849173,"asset_id":488860,"created_at":"2024-09-28T10:57:43.289+08:00","updated_at":"2024-09-28T10:57:43.289+08:00"},{"id":18637225,"file_name":"t_2.png","project_id":849173,"asset_id":488861,"created_at":"2024-09-28T10:57:43.289+08:00","updated_at":"2024-09-28T10:57:43.289+08:00"},{"id":18637226,"file_name":"t_6.png","project_id":849173,"asset_id":488863,"created_at":"2024-09-28T10:57:43.290+08:00","updated_at":"2024-09-28T10:57:43.290+08:00"},{"id":18637227,"file_name":"t_5.png","project_id":849173,"asset_id":488864,"created_at":"2024-09-28T10:57:43.291+08:00","updated_at":"2024-09-28T10:57:43.291+08:00"},{"id":18637228,"file_name":"t_4.png","project_id":849173,"asset_id":488865,"created_at":"2024-09-28T10:57:43.292+08:00","updated_at":"2024-09-28T10:57:43.292+08:00"},{"id":18637229,"file_name":"t_3.png","project_id":849173,"asset_id":488866,"created_at":"2024-09-28T10:57:43.293+08:00","updated_at":"2024-09-28T10:57:43.293+08:00"},{"id":18637230,"file_name":"t_1.png","project_id":849173,"asset_id":488867,"created_at":"2024-09-28T10:57:43.294+08:00","updated_at":"2024-09-28T10:57:43.294+08:00"},{"id":18637231,"file_name":"k_2.png","project_id":849173,"asset_id":488868,"created_at":"2024-09-28T10:57:43.295+08:00","updated_at":"2024-09-28T10:57:43.295+08:00"},{"id":18637232,"file_name":"fail.mp3","project_id":849173,"asset_id":551984,"created_at":"2024-09-28T10:57:43.296+08:00","updated_at":"2024-09-28T10:57:43.296+08:00"},{"id":18637233,"file_name":"fired.mp3","project_id":849173,"asset_id":551985,"created_at":"2024-09-28T10:57:43.297+08:00","updated_at":"2024-09-28T10:57:43.297+08:00"},{"id":18637234,"file_name":"bgm.mp3","project_id":849173,"asset_id":551982,"created_at":"2024-09-28T10:57:43.298+08:00","updated_at":"2024-09-28T10:57:43.298+08:00"},{"id":18637235,"file_name":"effect.mp3","project_id":849173,"asset_id":551983,"created_at":"2024-09-28T10:57:43.299+08:00","updated_at":"2024-09-28T10:57:43.299+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦