Compare commits
	
		
			No commits in common. "1eec945d93f6d0e990a06243109ab66e87a95a48" and "b3da61870c4568ad7ebf3cb466c28fdeeb15a5a6" have entirely different histories.
		
	
	
		
			1eec945d93
			...
			b3da61870c
		
	
		
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,2 +0,0 @@ | |||||||
| _saves/ |  | ||||||
| _server/config.json |  | ||||||
							
								
								
									
										1
									
								
								_saves/.exported
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								_saves/.exported
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | 1 | ||||||
							
								
								
									
										1
									
								
								_saves/Eustia_autoSave
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								_saves/Eustia_autoSave
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | N4IgZgNg9lBOCSATEAuEBnALrApjzADAIwgA0IAFjrFKqAJYC2AhgOY6qXVQB0A7jgBGABzIhmAOybNMHFGGYR0OchOaM5IAMLMmYiADdURchWEsAHqgCct66dEoiBF+RZrLqALQmQ75qgE5DIA1sauIIg4YOFBflExKHHownjISW5QEjgAnoHkOBaOcTgAjgCu9OY4EpioANoAuuT0sozodCAAxllYkpgdKKCCMGFO5JB5TgC+5JgwSnSzIGWVwoOg6HxwiCQzy9BdnYj0uF2Y9Fmc5aLkVigArORTzsuQbBsgrTiMACL4uggqGw5RUIHKygAQvgBDUADL0VgUOooEFggD66OUOEQmOMAHYAGwEawADgATOSACxxTGwSS49EE4lkyk04K4ZiDeqgDyaAA65SpOAIgkFDy6VPJYhY6wa2l0jAoUA0IEas156gFQpFYvKEqlMuYcpQ9RAACt6OVWOVJGqNSA+ZxBcLReLJdK3MbuSAANIAFQAavbSJrVWhBfjyYTyZHyWASF6TWaA4GAGLS9Whx1a53lKMxuMJo3JkCsKAQRAhXIhsPa116g2evze+WCegUCHlWhZut513Md2GpM+y3MKCYSSsWs58MgF0iwf6j0ln3oKgSVgSAzK1W92f1xdD5uytcUejb3ccfdOiP56Ox+/Fkfyy048cz2/z++Fp+JlullguD4MQYhAXghDNjaU5dBQU5iNBm6wVOzYWPQ45oVOoF3OhUCYZuBCobh+GsAAzJ+uYoBI5QQBAL6miAOT0BUJA3pR1G0fRZpMRUmYOreHF0QBPo8eU5FseGglcYxzFChRkk0UJp7yqJDzyXIUnCSpsmEupqCacpDGifielUYp0miaSpkGa2RmydY1nmVpdksQQ9rNBgIRVKgChKGCcGwOktLogFiBaBWcB4mguDIOQmLfIwAASF6YFFTRxeiEA4MwBg4HCUBdFFwDLJiBj0Og3yMp04EgXsaLLIIMJ4BIACCmCTl0IS/DIARmZxICYswOD0GlHmYic6DMIIWVVUMGDYBBoGmvURCkQ8zRNOqbwVtAAiwNyHlYDgJq+H0FxYPQXSfPMk4QP6TByOSDxEEQUpRjwhJ2C91hPN05SwLA93hkQDxUtYPCkXYUNQ4SDj5CAggyJgWXw4wWQ1hkKxFPDiPtVl3UsOw8PCFA5VZATbByCUFjYMwFNE5jaO5b8pw4OcEBTHEiISHAOAAMqyCaySTrAKKElSDykTwVLTMsoWcKu1ULbVnSyg0QQa6Qmva1ruv1D4pAG0bJgG0ExuGyblsWxbzQa1t5A0OUsicL6UAZloVKsAAvGIBiKKCGzLLl+2XBIebWDgpGIOKggPAQkbMNY0flNYhHx/qpKg+6BBgIK1iEkQMTkDa9DpCA5LMIghKEog1iFYgYBgFS6JUqSifooIVKEmA6JgIgU0EDgNJV3gYgXMD+KkficfWKRBBSi40xAA== | ||||||
| @ -854,8 +854,6 @@ action | |||||||
|     |   waitAsync_s |     |   waitAsync_s | ||||||
|     |   stopAsync_s |     |   stopAsync_s | ||||||
|     |   op_s |     |   op_s | ||||||
|     |   setmusics_s |  | ||||||
|     |   introAndLoop_s |  | ||||||
|     |   battle_s |     |   battle_s | ||||||
|     |   battle_1_s |     |   battle_1_s | ||||||
|     |   openDoor_s |     |   openDoor_s | ||||||
| @ -2614,23 +2612,6 @@ var code = '{"type": "setq"'+IdString_0+'},\n'; | |||||||
| return code; | return code; | ||||||
| */; | */; | ||||||
| 
 | 
 | ||||||
| introAndLoop_s |  | ||||||
|     :   '前奏音乐文件'EvalString? '前奏音乐文件播放时长(可填小数,单位为秒)'EvalString'循环音乐文件'EvalString?  Newline |  | ||||||
| 
 |  | ||||||
| /* introAndLoop_s |  | ||||||
| tooltip : introAndLoop:设置任务目标楼层(显示在小地图) |  | ||||||
| helpUrl : /_docs/#/instruction |  | ||||||
| default : ["",1,""] |  | ||||||
| allBgms : ['EvalString_0','EvalString_2'] |  | ||||||
| colour :this.imageColor |  | ||||||
| if(EvalString_1&&!/^(0|([1-9][0-9]*))(\.[\d]+)?$/.test(EvalString_1))throw new Error("此项仅能填写小数或整数,单位为秒"); |  | ||||||
| EvalString_0 = EvalString_0 ? (', "intro": "'+EvalString_0+'"') : ''; |  | ||||||
| EvalString_1= EvalString_1 ? (', "time": '+EvalString_1+'') : ''; |  | ||||||
| EvalString_2 = EvalString_2 ? (', "loop": "'+EvalString_2+'"') : ''; |  | ||||||
| var code = '{"type": "introAndLoop"'+EvalString_0+EvalString_1+EvalString_2+'},\n'; |  | ||||||
| return code; |  | ||||||
| */; |  | ||||||
| 
 |  | ||||||
| 
 | 
 | ||||||
| setcgs_s | setcgs_s | ||||||
|     :   'cg回廊获取cg 文件名'EvalString?'不填为清空cg获取记录'  Newline |     :   'cg回廊获取cg 文件名'EvalString?'不填为清空cg获取记录'  Newline | ||||||
| @ -2640,26 +2621,12 @@ tooltip : setcgs:cg回廊中的cg获取 | |||||||
| helpUrl : /_docs/#/instruction | helpUrl : /_docs/#/instruction | ||||||
| default : [""] | default : [""] | ||||||
| allImages : ['EvalString_0'] | allImages : ['EvalString_0'] | ||||||
| colour : this.soundColor | colour : this.imageColor | ||||||
| EvalString_0 = EvalString_0 ? (', "img": "'+EvalString_0+'"') : ''; | EvalString_0 = EvalString_0 ? (', "img": "'+EvalString_0+'"') : ''; | ||||||
| var code = '{"type": "setcgs"'+EvalString_0+'},\n'; | var code = '{"type": "setcgs"'+EvalString_0+'},\n'; | ||||||
| return code; | return code; | ||||||
| */; | */; | ||||||
| 
 | 
 | ||||||
| setmusics_s |  | ||||||
|     :   '音乐鉴赏music 文件名'EvalString?'不填为清空music获取记录'  Newline |  | ||||||
| 
 |  | ||||||
| /* setmusics_s |  | ||||||
| tooltip : setmusics:音乐鉴赏中的隐藏music获取 |  | ||||||
| helpUrl : /_docs/#/instruction |  | ||||||
| default : [""] |  | ||||||
| allBgms : ['EvalString_0'] |  | ||||||
| colour : this.soundColor |  | ||||||
| EvalString_0 = EvalString_0 ? (', "bgm": "'+EvalString_0+'"') : ''; |  | ||||||
| var code = '{"type": "setmusics"'+EvalString_0+'},\n'; |  | ||||||
| return code; |  | ||||||
| */; |  | ||||||
| 
 |  | ||||||
| scaleImage_s | scaleImage_s | ||||||
|     :   '图片放缩' '图片编号' NInt '中心点像素' 'x' PosString? 'y' PosString? '移动方式' MoveMode_List BGNL? '放缩比例' Number '动画时间' Int '不等待执行完毕' Bool Newline |     :   '图片放缩' '图片编号' NInt '中心点像素' 'x' PosString? 'y' PosString? '移动方式' MoveMode_List BGNL? '放缩比例' Number '动画时间' Int '不等待执行完毕' Bool Newline | ||||||
|         |         | ||||||
|  | |||||||
| @ -620,20 +620,6 @@ MotaActionParser = function () { | |||||||
|       case "setcgs": |       case "setcgs": | ||||||
|         this.next = MotaActionBlocks["setcgs_s"].xmlText([data.img, this.next]); |         this.next = MotaActionBlocks["setcgs_s"].xmlText([data.img, this.next]); | ||||||
|         break; |         break; | ||||||
|       case "setmusics": |  | ||||||
|         this.next = MotaActionBlocks["setmusics_s"].xmlText([ |  | ||||||
|           data.bgm, |  | ||||||
|           this.next, |  | ||||||
|         ]); |  | ||||||
|         break; |  | ||||||
|       case "introAndLoop": |  | ||||||
|         this.next = MotaActionBlocks["introAndLoop_s"].xmlText([ |  | ||||||
|           data.intro, |  | ||||||
|           data.time, |  | ||||||
|           data.loop, |  | ||||||
|           this.next, |  | ||||||
|         ]); |  | ||||||
|         break; |  | ||||||
|       case "comment": // 注释
 |       case "comment": // 注释
 | ||||||
|         this.next = MotaActionBlocks["comment_s"].xmlText([ |         this.next = MotaActionBlocks["comment_s"].xmlText([ | ||||||
|           this.EvalString_Multi(data.text), |           this.EvalString_Multi(data.text), | ||||||
|  | |||||||
							
								
								
									
										1
									
								
								_server/config.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								_server/config.json
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | { "viewportLoc": [0, 0], "editorLastFloorId": "jiedao" } | ||||||
| @ -122,12 +122,6 @@ var plugins_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { | |||||||
| 				"_type": "textarea", | 				"_type": "textarea", | ||||||
| 				"_range": "typeof(thiseval)=='string' || thiseval==null", | 				"_range": "typeof(thiseval)=='string' || thiseval==null", | ||||||
| 				"_data": "音乐鉴赏" | 				"_data": "音乐鉴赏" | ||||||
| 			}, |  | ||||||
| 			"intro&loop": { |  | ||||||
| 				"_leaf": true, |  | ||||||
| 				"_type": "textarea", |  | ||||||
| 				"_range": "typeof(thiseval)=='string' || thiseval==null", |  | ||||||
| 				"_data": "背景音乐拼接" |  | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		if (obj[key]) return obj[key]; | 		if (obj[key]) return obj[key]; | ||||||
|  | |||||||
							
								
								
									
										1
									
								
								main.js
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								main.js
									
									
									
									
									
								
							| @ -492,6 +492,7 @@ main.prototype.selectButton = function (index) { | |||||||
| main.prototype.importFonts = function (fonts) { | main.prototype.importFonts = function (fonts) { | ||||||
|   if (!(fonts instanceof Array) || fonts.length == 0) return; |   if (!(fonts instanceof Array) || fonts.length == 0) return; | ||||||
|   var style = document.createElement("style"); |   var style = document.createElement("style"); | ||||||
|  |   style.type = "text/css"; | ||||||
|   var html = ""; |   var html = ""; | ||||||
|   fonts.forEach(function (font) { |   fonts.forEach(function (font) { | ||||||
|     html += |     html += | ||||||
|  | |||||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								project/bgms/theme.opus
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								project/bgms/theme.opus
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| @ -897,15 +897,11 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = | |||||||
| 			"zone" | 			"zone" | ||||||
| 		], | 		], | ||||||
| 		"bgms": [ | 		"bgms": [ | ||||||
| 			"Ascension.opus", |  | ||||||
| 			"Asphodelus_Ceui.opus", | 			"Asphodelus_Ceui.opus", | ||||||
| 			"Blind_Alley.opus", | 			"Blind_Alley.opus", | ||||||
| 			"Blood_Stain.opus", |  | ||||||
| 			"Crawler.opus", | 			"Crawler.opus", | ||||||
| 			"Halbmond.opus", |  | ||||||
| 			"ed.opus", |  | ||||||
| 			"op.opus", | 			"op.opus", | ||||||
| 			"theme.mp3" | 			"theme.opus" | ||||||
| 		], | 		], | ||||||
| 		"sounds": [ | 		"sounds": [ | ||||||
| 			"aiy010000010.opus", | 			"aiy010000010.opus", | ||||||
| @ -1023,7 +1019,6 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = | |||||||
| 		], | 		], | ||||||
| 		"fonts": [ | 		"fonts": [ | ||||||
| 			"HATTEN", | 			"HATTEN", | ||||||
| 			"Verdana", |  | ||||||
| 			"number", | 			"number", | ||||||
| 			"pala", | 			"pala", | ||||||
| 			"simhei" | 			"simhei" | ||||||
| @ -1062,7 +1057,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = | |||||||
| 			"饰品", | 			"饰品", | ||||||
| 			"饰品" | 			"饰品" | ||||||
| 		], | 		], | ||||||
| 		"startBgm": "theme.mp3", | 		"startBgm": "theme.opus", | ||||||
| 		"styles": { | 		"styles": { | ||||||
| 			"startBackground": "project/images/background.webp", | 			"startBackground": "project/images/background.webp", | ||||||
| 			"startVerticalBackground": "project/images/backgroundvertical.webp", | 			"startVerticalBackground": "project/images/backgroundvertical.webp", | ||||||
| @ -1494,10 +1489,6 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = | |||||||
| 				"type": "setValue", | 				"type": "setValue", | ||||||
| 				"name": "item:fly", | 				"name": "item:fly", | ||||||
| 				"value": "1" | 				"value": "1" | ||||||
| 			}, |  | ||||||
| 			{ |  | ||||||
| 				"type": "insert", |  | ||||||
| 				"name": "强制横屏" |  | ||||||
| 			} | 			} | ||||||
| 		], | 		], | ||||||
| 		"shops": [ | 		"shops": [ | ||||||
|  | |||||||
| @ -435,11 +435,6 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 = | |||||||
| 				"time": 30, | 				"time": 30, | ||||||
| 				"style": "场景切换" | 				"style": "场景切换" | ||||||
| 			}, | 			}, | ||||||
| 			{ |  | ||||||
| 				"type": "playBgm", |  | ||||||
| 				"name": "Blood_Stain.opus", |  | ||||||
| 				"keep": true |  | ||||||
| 			}, |  | ||||||
| 			{ | 			{ | ||||||
| 				"type": "cgtext", | 				"type": "cgtext", | ||||||
| 				"bg": "other_0001.webp", | 				"bg": "other_0001.webp", | ||||||
| @ -3402,11 +3397,6 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 = | |||||||
| 					} | 					} | ||||||
| 				] | 				] | ||||||
| 			}, | 			}, | ||||||
| 			{ |  | ||||||
| 				"type": "playBgm", |  | ||||||
| 				"name": "Halbmond.opus", |  | ||||||
| 				"keep": true |  | ||||||
| 			}, |  | ||||||
| 			{ | 			{ | ||||||
| 				"type": "cgtext", | 				"type": "cgtext", | ||||||
| 				"bg": "bg_3601.webp", | 				"bg": "bg_3601.webp", | ||||||
|  | |||||||
| @ -26,25 +26,58 @@ main.floors.street01= | |||||||
|                 "direction": "up" |                 "direction": "up" | ||||||
|             } |             } | ||||||
|         ], |         ], | ||||||
|         "10,11": [ |         "6,11": [ | ||||||
|             { |             { | ||||||
|                 "type": "setmusics", |                 "type": "insert", | ||||||
|                 "bgm": "op.opus" |                 "name": "chapter04" | ||||||
|             } |             } | ||||||
|         ], |         ], | ||||||
|         "10,10": [ |         "4,11": [ | ||||||
|             { |             { | ||||||
|                 "type": "setmusics", |                 "type": "animationDrawable", | ||||||
|                 "bgm": "ed.opus" |                 "allFarme": 300, | ||||||
|  |                 "color": [ | ||||||
|  |                     0, | ||||||
|  |                     0, | ||||||
|  |                     0 | ||||||
|  |                 ], | ||||||
|  |                 "imageList": [ | ||||||
|  |                     { | ||||||
|  |                         "image": "bg_1511.webp", | ||||||
|  |                         "beforefarme": 50, | ||||||
|  |                         "globalAlpha": 0, | ||||||
|  |                         "afterfarme": 250, | ||||||
|  |                         "aglobalAlpha": 100 | ||||||
|                     }, |                     }, | ||||||
|                     { |                     { | ||||||
|                 "type": "setmusics", |                         "image": "eve_010304.webp", | ||||||
|                 "bgm": "Asphodelus_Ceui.opus" |                         "beforefarme": 70, | ||||||
|  |                         "globalAlpha": 0, | ||||||
|  |                         "afterfarme": 170, | ||||||
|  |                         "aglobalAlpha": 100, | ||||||
|  |                         "ax": 0, | ||||||
|  |                         "ay": 0 | ||||||
|  |                     }, | ||||||
|  |                     { | ||||||
|  |                         "image": "eve_010304.webp", | ||||||
|  |                         "beforefarme": 171, | ||||||
|  |                         "globalAlpha": 100, | ||||||
|  |                         "afterfarme": 270, | ||||||
|  |                         "aglobalAlpha": 100, | ||||||
|  |                         "ax": 800, | ||||||
|  |                         "ay": 0 | ||||||
|                     } |                     } | ||||||
|                 ], |                 ], | ||||||
|         "10,9": [ |                 "soundList": [ | ||||||
|                     { |                     { | ||||||
|                 "type": "setmusics" |                         "sound": "", | ||||||
|  |                         "startfarme": 0, | ||||||
|  |                         "stopbefore": false | ||||||
|  |                     } | ||||||
|  |                 ] | ||||||
|  |             }, | ||||||
|  |             { | ||||||
|  |                 "type": "op" | ||||||
|             } |             } | ||||||
|         ] |         ] | ||||||
|     }, |     }, | ||||||
|  | |||||||
										
											Binary file not shown.
										
									
								
							| @ -3,11 +3,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|     this._afterLoadResources = function () { |     this._afterLoadResources = function () { | ||||||
|       // 本函数将在所有资源加载完毕后,游戏开启前被执行
 |       // 本函数将在所有资源加载完毕后,游戏开启前被执行
 | ||||||
|       core.ui.statusBar.init(); |       core.ui.statusBar.init(); | ||||||
|       core.dom.playGame.style.fontFamily = "pala"; |  | ||||||
|       core.dom.loadGame.style.fontFamily = "pala"; |  | ||||||
|       core.dom.CGMode.style.fontFamily = "pala"; |  | ||||||
|       core.dom.musicMode.style.fontFamily = "pala"; |  | ||||||
|       core.dom.replayGame.style.fontFamily = "pala"; |  | ||||||
|       core.registerEvent("changeMouse", function (data) { |       core.registerEvent("changeMouse", function (data) { | ||||||
|         if (!main.replayChecking && !core.isReplaying()) |         if (!main.replayChecking && !core.isReplaying()) | ||||||
|           core.changeMouse( |           core.changeMouse( | ||||||
| @ -223,45 +218,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|           core.doAction(); |           core.doAction(); | ||||||
|         } |         } | ||||||
|       }); |       }); | ||||||
|       core.registerEvent("introAndLoop", function (data) { |  | ||||||
|         if (!main.replayChecking && !core.isReplaying()) { |  | ||||||
|           core.plugin.introAndLoop(data.intro, data.time, data.loop); |  | ||||||
|           core.doAction(); |  | ||||||
|         } else { |  | ||||||
|           core.doAction(); |  | ||||||
|         } |  | ||||||
|       }); |  | ||||||
|       core.registerEvent("setq", function (data) { |  | ||||||
|         core.setFlag("任务地点", data.id); |  | ||||||
| 
 |  | ||||||
|         core.doAction(); |  | ||||||
|       }); |  | ||||||
|       core.registerEvent("setmusics", function (data) { |  | ||||||
|         if ( |  | ||||||
|           (core.getLocalStorage("musics") && |  | ||||||
|             core.getLocalStorage("musics").length === 0) || |  | ||||||
|           !core.getLocalStorage("musics") |  | ||||||
|         ) |  | ||||||
|           core.setLocalStorage("musics", ["theme.mp3"]); |  | ||||||
|         let a = core.getLocalStorage("musics"); |  | ||||||
|         if (!data.bgm) { |  | ||||||
|           core.setLocalStorage("musics", ["theme.mp3"]); |  | ||||||
|         } else { |  | ||||||
|           if (!a.includes(data.bgm)) a.push(data.bgm); |  | ||||||
|           core.setLocalStorage("musics", a); |  | ||||||
|         } |  | ||||||
|         core.doAction(); |  | ||||||
|       }); |  | ||||||
|       core.registerEvent("setcgs", function (data) { |  | ||||||
|         if (!data.img) { |  | ||||||
|           core.setLocalStorage("cgs", []); |  | ||||||
|         } else { |  | ||||||
|           let a = core.getLocalStorage("cgs") ?? []; |  | ||||||
|           if (!a.includes(data.img)) a.push(data.img); |  | ||||||
|           core.setLocalStorage("cgs", a); |  | ||||||
|         } |  | ||||||
|         core.doAction(); |  | ||||||
|       }); |  | ||||||
|     }; |     }; | ||||||
|   }, |   }, | ||||||
|   drawLight: function () { |   drawLight: function () { | ||||||
| @ -9572,15 +9528,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|         this.gain = this.ac.createGain(); |         this.gain = this.ac.createGain(); | ||||||
|         this.gain.connect(this.ac.destination); |         this.gain.connect(this.ac.destination); | ||||||
|         this.audioRoutes = new Map(); |         this.audioRoutes = new Map(); | ||||||
|         const func = () => { |  | ||||||
|           this.ac.resume(); |  | ||||||
|           document.body.removeEventListener("mousedown", func); |  | ||||||
|           document.body.removeEventListener("touchstart", func); |  | ||||||
|           document.body.removeEventListener("keydown", func); |  | ||||||
|         }; |  | ||||||
|         document.body.addEventListener("mousedown", func, { capture: true }); |  | ||||||
|         document.body.addEventListener("touchstart", func, { capture: true }); |  | ||||||
|         document.body.addEventListener("keydown", func, { capture: true }); |  | ||||||
|       } |       } | ||||||
|       /** |       /** | ||||||
|        * 解码音频数据 |        * 解码音频数据 | ||||||
| @ -11666,9 +11613,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|             ], |             ], | ||||||
|             特效表现: [ |             特效表现: [ | ||||||
|               MotaActionBlocks["sleep_s"].xmlText(), |               MotaActionBlocks["sleep_s"].xmlText(), | ||||||
|               MotaActionBlocks["setq_s"].xmlText(), |  | ||||||
|               MotaActionBlocks["setcgs_s"].xmlText(), |  | ||||||
|               MotaActionBlocks["setmusics_s"].xmlText(), |  | ||||||
|               MotaActionBlocks["changebg_s"].xmlText(), |               MotaActionBlocks["changebg_s"].xmlText(), | ||||||
|               MotaActionFunctions.actionParser.parseList({ |               MotaActionFunctions.actionParser.parseList({ | ||||||
|                 type: "wait", |                 type: "wait", | ||||||
| @ -11720,6 +11664,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|               MotaActionBlocks["changeMouse_s"].xmlText(), |               MotaActionBlocks["changeMouse_s"].xmlText(), | ||||||
|               MotaActionBlocks["removeMouse_s"].xmlText(), |               MotaActionBlocks["removeMouse_s"].xmlText(), | ||||||
|               MotaActionBlocks["vibrate_s"].xmlText(), |               MotaActionBlocks["vibrate_s"].xmlText(), | ||||||
|  |               MotaActionBlocks["setanimate_s"].xmlText(), | ||||||
|  |               MotaActionBlocks["deleteanimate_s"].xmlText(), | ||||||
|  |               MotaActionBlocks["playanimate_s"].xmlText(), | ||||||
|  |               MotaActionBlocks["clearanimate_s"].xmlText(), | ||||||
|               MotaActionBlocks["animate_s"].xmlText(), |               MotaActionBlocks["animate_s"].xmlText(), | ||||||
|               MotaActionBlocks["animate_1_s"].xmlText(), |               MotaActionBlocks["animate_1_s"].xmlText(), | ||||||
|               MotaActionBlocks["stopAnimate_s"].xmlText(), |               MotaActionBlocks["stopAnimate_s"].xmlText(), | ||||||
| @ -11741,7 +11689,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|             ], |             ], | ||||||
|             音像处理: [ |             音像处理: [ | ||||||
|               MotaActionBlocks["animationDrawable_s"].xmlText(), |               MotaActionBlocks["animationDrawable_s"].xmlText(), | ||||||
|               MotaActionBlocks["introAndLoop_s"].xmlText(), |  | ||||||
|               MotaActionBlocks["setanimate_s"].xmlText(), |               MotaActionBlocks["setanimate_s"].xmlText(), | ||||||
|               MotaActionBlocks["deleteanimate_s"].xmlText(), |               MotaActionBlocks["deleteanimate_s"].xmlText(), | ||||||
|               MotaActionBlocks["playanimate_s"].xmlText(), |               MotaActionBlocks["playanimate_s"].xmlText(), | ||||||
| @ -16506,28 +16453,19 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
| 
 | 
 | ||||||
|     class musicclass { |     class musicclass { | ||||||
|       constructor() { |       constructor() { | ||||||
|         this.musics = ["theme.mp3"]; |  | ||||||
|         //music列表
 |         //music列表
 | ||||||
|         //需全塔属性注册并保存在bgms文件夹,每个数组为显示的一页内容
 |         //需全塔属性注册并保存在bgms文件夹,每个数组为显示的一页内容
 | ||||||
|         this.musicMx = [ |         this.musicMx = [ | ||||||
|           [ |           ["Asphodelus_Ceui.opus", "Blind_Alley.opus"], | ||||||
|             "Crawler.opus", |           ["Crawler.opus", "op.opus", "theme.opus"], | ||||||
|             "Blood_Stain.opus", |  | ||||||
|             "Blind_Alley.opus", |  | ||||||
|             "Halbmond.opus", |  | ||||||
|           ], |  | ||||||
|           ["theme.mp3", "op.opus", "Asphodelus_Ceui.opus", "ed.opus"], |  | ||||||
|         ]; |         ]; | ||||||
|         //音乐别名(将在播放器内显示的音乐名,music列表内的都要有对应歌名)
 |         //音乐别名(将在播放器内显示的音乐名,music列表内的都要有对应歌名)
 | ||||||
|         this.musicname = { |         this.musicname = { | ||||||
|           "Asphodelus_Ceui.opus": "Asphodelus (Full.ver)", |           "Asphodelus_Ceui.opus": "Asphodelus", | ||||||
|           "Blind_Alley.opus": "Blind Alley", |           "Blind_Alley.opus": "Blind", | ||||||
|           "Crawler.opus": "Crawler", |           "Crawler.opus": "Crawler", | ||||||
|           "op.opus": "Asphodelus", |           "op.opus": "op", | ||||||
|           "theme.mp3": "One of Episodes", |           "theme.opus": "theme", | ||||||
|           "ed.opus": "親愛なる世界へ", |  | ||||||
|           "Blood_Stain.opus": "Blood Stain", |  | ||||||
|           "Halbmond.opus": "Halbmond", |  | ||||||
|         }; |         }; | ||||||
|         this.selection = [0, 0]; |         this.selection = [0, 0]; | ||||||
|         this.stop = false; |         this.stop = false; | ||||||
| @ -16623,7 +16561,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
| 
 | 
 | ||||||
|                 break; |                 break; | ||||||
|               case "xunhuan": |               case "xunhuan": | ||||||
|                 for (;;) { |  | ||||||
|                 if (this.selection[1] === 0) { |                 if (this.selection[1] === 0) { | ||||||
|                   if (this.selection[0] === 0) { |                   if (this.selection[0] === 0) { | ||||||
|                     this.selection[0] = this.musicMx.length - 1; |                     this.selection[0] = this.musicMx.length - 1; | ||||||
| @ -16637,18 +16574,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|                 } else { |                 } else { | ||||||
|                   this.selection[1] -= 1; |                   this.selection[1] -= 1; | ||||||
|                 } |                 } | ||||||
|                   this.random = this.randomList.indexOf( |                 this.randomList.indexOf( | ||||||
|                   this.musicMx[this.selection[0]][this.selection[1]] |                   this.musicMx[this.selection[0]][this.selection[1]] | ||||||
|                 ); |                 ); | ||||||
|                 page = this.selection[0]; |                 page = this.selection[0]; | ||||||
|                   if ( | 
 | ||||||
|                     this.musics.includes( |  | ||||||
|                       this.musicMx[this.selection[0]][this.selection[1]] |  | ||||||
|                     ) || |  | ||||||
|                     page !== this.musicMx.length - 1 |  | ||||||
|                   ) |  | ||||||
|                     break; |  | ||||||
|                 } |  | ||||||
|                 core.playBgm( |                 core.playBgm( | ||||||
|                   main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ |                   main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ | ||||||
|                     main.core.ui.music.selection[1] |                     main.core.ui.music.selection[1] | ||||||
| @ -16657,7 +16587,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
| 
 | 
 | ||||||
|                 break; |                 break; | ||||||
|               case "suiji": |               case "suiji": | ||||||
|                 for (;;) { |  | ||||||
|                 if (this.random > 0) { |                 if (this.random > 0) { | ||||||
|                   this.random -= 1; |                   this.random -= 1; | ||||||
|                 } else { |                 } else { | ||||||
| @ -16671,14 +16600,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|                 ); |                 ); | ||||||
| 
 | 
 | ||||||
|                 page = this.selection[0]; |                 page = this.selection[0]; | ||||||
|                   if ( | 
 | ||||||
|                     this.musics.includes( |  | ||||||
|                       this.musicMx[this.selection[0]][this.selection[1]] |  | ||||||
|                     ) || |  | ||||||
|                     page !== this.musicMx.length - 1 |  | ||||||
|                   ) |  | ||||||
|                     break; |  | ||||||
|                 } |  | ||||||
|                 core.playBgm( |                 core.playBgm( | ||||||
|                   main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ |                   main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ | ||||||
|                     main.core.ui.music.selection[1] |                     main.core.ui.music.selection[1] | ||||||
| @ -16702,7 +16624,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|                 page = this.selection[0]; |                 page = this.selection[0]; | ||||||
|                 break; |                 break; | ||||||
|               case "xunhuan": |               case "xunhuan": | ||||||
|                 for (;;) { |  | ||||||
|                 if ( |                 if ( | ||||||
|                   this.selection[1] === |                   this.selection[1] === | ||||||
|                   this.musicMx[this.selection[0]].length - 1 |                   this.musicMx[this.selection[0]].length - 1 | ||||||
| @ -16721,14 +16642,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|                   this.musicMx[this.selection[0]][this.selection[1]] |                   this.musicMx[this.selection[0]][this.selection[1]] | ||||||
|                 ); |                 ); | ||||||
|                 page = this.selection[0]; |                 page = this.selection[0]; | ||||||
|                   if ( | 
 | ||||||
|                     this.musics.includes( |  | ||||||
|                       this.musicMx[this.selection[0]][this.selection[1]] |  | ||||||
|                     ) || |  | ||||||
|                     page !== this.musicMx.length - 1 |  | ||||||
|                   ) |  | ||||||
|                     break; |  | ||||||
|                 } |  | ||||||
|                 core.playBgm( |                 core.playBgm( | ||||||
|                   main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ |                   main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ | ||||||
|                     main.core.ui.music.selection[1] |                     main.core.ui.music.selection[1] | ||||||
| @ -16737,7 +16651,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
| 
 | 
 | ||||||
|                 break; |                 break; | ||||||
|               case "suiji": |               case "suiji": | ||||||
|                 for (;;) { |  | ||||||
|                 if (this.random < this.randomList.length - 1) { |                 if (this.random < this.randomList.length - 1) { | ||||||
|                   this.random += 1; |                   this.random += 1; | ||||||
|                 } else { |                 } else { | ||||||
| @ -16751,14 +16664,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|                 ); |                 ); | ||||||
| 
 | 
 | ||||||
|                 page = this.selection[0]; |                 page = this.selection[0]; | ||||||
|                   if ( |  | ||||||
|                     this.musics.includes( |  | ||||||
|                       this.musicMx[this.selection[0]][this.selection[1]] |  | ||||||
|                     ) || |  | ||||||
|                     page !== this.musicMx.length - 1 |  | ||||||
|                   ) |  | ||||||
|                     break; |  | ||||||
|                 } |  | ||||||
|                 core.playBgm( |                 core.playBgm( | ||||||
|                   main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ |                   main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ | ||||||
|                     main.core.ui.music.selection[1] |                     main.core.ui.music.selection[1] | ||||||
| @ -16786,12 +16691,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|           if (inRect(pos, musicbox)) { |           if (inRect(pos, musicbox)) { | ||||||
|             const index = Math.floor((py - 200) / 100); |             const index = Math.floor((py - 200) / 100); | ||||||
|             if (page !== this.selection[0] || index !== this.selection[1]) { |             if (page !== this.selection[0] || index !== this.selection[1]) { | ||||||
|               if ( |  | ||||||
|                 this.musics.includes(this.musicMx[page][index]) || |  | ||||||
|                 page !== this.musicMx.length - 1 |  | ||||||
|               ) { |  | ||||||
|               this.selection[0] = page; |               this.selection[0] = page; | ||||||
| 
 |  | ||||||
|               this.selection[1] = index; |               this.selection[1] = index; | ||||||
|               this.randomList.indexOf( |               this.randomList.indexOf( | ||||||
|                 this.musicMx[this.selection[0]][this.selection[1]] |                 this.musicMx[this.selection[0]][this.selection[1]] | ||||||
| @ -16804,7 +16704,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|               ); |               ); | ||||||
| 
 | 
 | ||||||
|               this.stop = false; |               this.stop = false; | ||||||
|               } |  | ||||||
|             } else { |             } else { | ||||||
|               if (this.stop) { |               if (this.stop) { | ||||||
|                 this.stop = !this.stop; |                 this.stop = !this.stop; | ||||||
| @ -16859,6 +16758,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|             this.stop = false; |             this.stop = false; | ||||||
|             switch (this.type) { |             switch (this.type) { | ||||||
|               case "danqu": |               case "danqu": | ||||||
|  |                 if (!this.stop) | ||||||
|                   core.playBgm( |                   core.playBgm( | ||||||
|                     main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ |                     main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ | ||||||
|                       main.core.ui.music.selection[1] |                       main.core.ui.music.selection[1] | ||||||
| @ -16869,7 +16769,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
| 
 | 
 | ||||||
|                 break; |                 break; | ||||||
|               case "xunhuan": |               case "xunhuan": | ||||||
|                 for (;;) { |  | ||||||
|                 if (this.selection[1] === 0) { |                 if (this.selection[1] === 0) { | ||||||
|                   if (this.selection[0] === 0) { |                   if (this.selection[0] === 0) { | ||||||
|                     this.selection[0] = this.musicMx.length - 1; |                     this.selection[0] = this.musicMx.length - 1; | ||||||
| @ -16888,14 +16787,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|                 ); |                 ); | ||||||
|                 page = this.selection[0]; |                 page = this.selection[0]; | ||||||
| 
 | 
 | ||||||
|                   if ( |                 if (!this.stop) | ||||||
|                     this.musics.includes( |  | ||||||
|                       this.musicMx[this.selection[0]][this.selection[1]] |  | ||||||
|                     ) || |  | ||||||
|                     page !== this.musicMx.length - 1 |  | ||||||
|                   ) |  | ||||||
|                     break; |  | ||||||
|                 } |  | ||||||
|                   core.playBgm( |                   core.playBgm( | ||||||
|                     main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ |                     main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ | ||||||
|                       main.core.ui.music.selection[1] |                       main.core.ui.music.selection[1] | ||||||
| @ -16904,7 +16796,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
| 
 | 
 | ||||||
|                 break; |                 break; | ||||||
|               case "suiji": |               case "suiji": | ||||||
|                 for (;;) { |  | ||||||
|                 if (this.random > 0) { |                 if (this.random > 0) { | ||||||
|                   this.random -= 1; |                   this.random -= 1; | ||||||
|                 } else { |                 } else { | ||||||
| @ -16919,14 +16810,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
| 
 | 
 | ||||||
|                 page = this.selection[0]; |                 page = this.selection[0]; | ||||||
| 
 | 
 | ||||||
|                   if ( |                 if (!this.stop) | ||||||
|                     this.musics.includes( |  | ||||||
|                       this.musicMx[this.selection[0]][this.selection[1]] |  | ||||||
|                     ) || |  | ||||||
|                     page !== this.musicMx.length - 1 |  | ||||||
|                   ) |  | ||||||
|                     break; |  | ||||||
|                 } |  | ||||||
|                   core.playBgm( |                   core.playBgm( | ||||||
|                     main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ |                     main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ | ||||||
|                       main.core.ui.music.selection[1] |                       main.core.ui.music.selection[1] | ||||||
| @ -16941,6 +16825,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|             this.stop = false; |             this.stop = false; | ||||||
|             switch (this.type) { |             switch (this.type) { | ||||||
|               case "danqu": |               case "danqu": | ||||||
|  |                 if (!this.stop) | ||||||
|                   core.playBgm( |                   core.playBgm( | ||||||
|                     main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ |                     main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ | ||||||
|                       main.core.ui.music.selection[1] |                       main.core.ui.music.selection[1] | ||||||
| @ -16950,7 +16835,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|                 page = this.selection[0]; |                 page = this.selection[0]; | ||||||
|                 break; |                 break; | ||||||
|               case "xunhuan": |               case "xunhuan": | ||||||
|                 for (;;) { |  | ||||||
|                 if ( |                 if ( | ||||||
|                   this.selection[1] === |                   this.selection[1] === | ||||||
|                   this.musicMx[this.selection[0]].length - 1 |                   this.musicMx[this.selection[0]].length - 1 | ||||||
| @ -16971,14 +16855,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|                 ); |                 ); | ||||||
|                 page = this.selection[0]; |                 page = this.selection[0]; | ||||||
| 
 | 
 | ||||||
|                   if ( |                 if (!this.stop) | ||||||
|                     this.musics.includes( |  | ||||||
|                       this.musicMx[this.selection[0]][this.selection[1]] |  | ||||||
|                     ) || |  | ||||||
|                     page !== this.musicMx.length - 1 |  | ||||||
|                   ) |  | ||||||
|                     break; |  | ||||||
|                 } |  | ||||||
|                   core.playBgm( |                   core.playBgm( | ||||||
|                     main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ |                     main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ | ||||||
|                       main.core.ui.music.selection[1] |                       main.core.ui.music.selection[1] | ||||||
| @ -16987,7 +16864,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
| 
 | 
 | ||||||
|                 break; |                 break; | ||||||
|               case "suiji": |               case "suiji": | ||||||
|                 for (;;) { |  | ||||||
|                 if (this.random < this.randomList.length - 1) { |                 if (this.random < this.randomList.length - 1) { | ||||||
|                   this.random += 1; |                   this.random += 1; | ||||||
|                 } else { |                 } else { | ||||||
| @ -17001,14 +16877,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|                 ); |                 ); | ||||||
| 
 | 
 | ||||||
|                 page = this.selection[0]; |                 page = this.selection[0]; | ||||||
|                   if ( |                 if (!this.stop) | ||||||
|                     this.musics.includes( |  | ||||||
|                       this.musicMx[this.selection[0]][this.selection[1]] |  | ||||||
|                     ) || |  | ||||||
|                     page !== this.musicMx.length - 1 |  | ||||||
|                   ) |  | ||||||
|                     break; |  | ||||||
|                 } |  | ||||||
|                   core.playBgm( |                   core.playBgm( | ||||||
|                     main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ |                     main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ | ||||||
|                       main.core.ui.music.selection[1] |                       main.core.ui.music.selection[1] | ||||||
| @ -17036,15 +16905,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|           if (inRect(pos, musicbox)) { |           if (inRect(pos, musicbox)) { | ||||||
|             const index = Math.floor((py - 100) / 100); |             const index = Math.floor((py - 100) / 100); | ||||||
|             if (page !== this.selection[0] || index !== this.selection[1]) { |             if (page !== this.selection[0] || index !== this.selection[1]) { | ||||||
|               if ( |  | ||||||
|                 this.musics.includes(this.musicMx[page][index]) || |  | ||||||
|                 page !== this.musicMx.length - 1 |  | ||||||
|               ) { |  | ||||||
|               this.selection[0] = page; |               this.selection[0] = page; | ||||||
|               this.selection[1] = index; |               this.selection[1] = index; | ||||||
|               this.randomList.indexOf( |               this.randomList.indexOf( | ||||||
|                   (v) => |                 (v) => v === this.musicMx[this.selection[0]][this.selection[1]] | ||||||
|                     v === this.musicMx[this.selection[0]][this.selection[1]] |  | ||||||
|               ); |               ); | ||||||
| 
 | 
 | ||||||
|               core.playBgm( |               core.playBgm( | ||||||
| @ -17053,7 +16917,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|                 ] |                 ] | ||||||
|               ); |               ); | ||||||
|               this.stop = false; |               this.stop = false; | ||||||
|               } |  | ||||||
|             } else { |             } else { | ||||||
|               if (this.stop) { |               if (this.stop) { | ||||||
|                 this.stop = !this.stop; |                 this.stop = !this.stop; | ||||||
| @ -17126,10 +16989,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|           core.setTextAlign(ctx, "left"); |           core.setTextAlign(ctx, "left"); | ||||||
|           for (let i = 0; i < indexList.length; i++) { |           for (let i = 0; i < indexList.length; i++) { | ||||||
|             const text = this.musicname[indexList[i]]; |             const text = this.musicname[indexList[i]]; | ||||||
|             if ( |  | ||||||
|               this.musics.includes(this.musicMx[page][i]) || |  | ||||||
|               page !== this.musicMx.length - 1 |  | ||||||
|             ) { |  | ||||||
|             core.fillBoldText1( |             core.fillBoldText1( | ||||||
|               ctx, |               ctx, | ||||||
|               text, |               text, | ||||||
| @ -17142,14 +17001,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|               6, |               6, | ||||||
|               core.ui._buildFont(66, true) |               core.ui._buildFont(66, true) | ||||||
|             ); |             ); | ||||||
| 
 |  | ||||||
|             ctx.strokeStyle = "#FFFFFF"; |             ctx.strokeStyle = "#FFFFFF"; | ||||||
|             ctx.lineWidth = 3; |             ctx.lineWidth = 3; | ||||||
|             ctx.beginPath(); |             ctx.beginPath(); | ||||||
|             ctx.moveTo(100, posy); |             ctx.moveTo(100, posy); | ||||||
|             ctx.lineTo(1148, posy); |             ctx.lineTo(1148, posy); | ||||||
|             ctx.stroke(); |             ctx.stroke(); | ||||||
|             } |  | ||||||
|             posy += 100; |             posy += 100; | ||||||
|           } |           } | ||||||
|           ctx.beginPath(); |           ctx.beginPath(); | ||||||
| @ -17194,63 +17051,19 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|           ctx.strokeStyle = "#ffffff"; |           ctx.strokeStyle = "#ffffff"; | ||||||
|           ctx.lineWidth = 3; |           ctx.lineWidth = 3; | ||||||
| 
 | 
 | ||||||
|           core.fillBoldText( |           ctx.fillStyle = "#ffffff"; | ||||||
|             ctx, |           ctx.font = "bold 96px Verdana"; | ||||||
|             "|", |           ctx.fillText("|", 100, 1697); | ||||||
|             100, |           ctx.fillText("◀", 115, 1700); | ||||||
|             1697, |  | ||||||
|             "#FFFFFF", |  | ||||||
|             6, |  | ||||||
|             core.ui._buildFont(96, true) |  | ||||||
|           ); |  | ||||||
|           core.fillBoldText( |  | ||||||
|             ctx, |  | ||||||
|             "◀", |  | ||||||
|             115, |  | ||||||
|             1700, |  | ||||||
|             "#FFFFFF", |  | ||||||
|             6, |  | ||||||
|             core.ui._buildFont(96, true) |  | ||||||
|           ); |  | ||||||
| 
 |  | ||||||
|           ctx.beginPath(); |           ctx.beginPath(); | ||||||
|           ctx.arc(505, 1670, 80, 0, 3 * Math.PI); |           ctx.arc(505, 1670, 80, 0, 3 * Math.PI); | ||||||
|           ctx.stroke(); |           ctx.stroke(); | ||||||
|           core.fillText( |           ctx.fillText("|", 835, 1697); | ||||||
|             ctx, |           ctx.fillText("▶", 785, 1700); | ||||||
|             "|", |  | ||||||
|             835, |  | ||||||
|             1697, |  | ||||||
|             "#FFFFFF", |  | ||||||
|             core.ui._buildFont(96, true) |  | ||||||
|           ); |  | ||||||
|           core.fillText( |  | ||||||
|             ctx, |  | ||||||
|             "▶", |  | ||||||
|             785, |  | ||||||
|             1700, |  | ||||||
|             "#FFFFFF", |  | ||||||
|             core.ui._buildFont(96, true) |  | ||||||
|           ); |  | ||||||
| 
 |  | ||||||
|           if (this.stop) { |           if (this.stop) { | ||||||
|             core.fillText( |             ctx.fillText("▶", 473, 1697); | ||||||
|               ctx, |  | ||||||
|               "▶", |  | ||||||
|               473, |  | ||||||
|               1700, |  | ||||||
|               "#FFFFFF", |  | ||||||
|               core.ui._buildFont(96, true) |  | ||||||
|             ); |  | ||||||
|           } else { |           } else { | ||||||
|             core.fillText( |             ctx.fillText("||", 453, 1694); | ||||||
|               ctx, |  | ||||||
|               "||", |  | ||||||
|               453, |  | ||||||
|               1700, |  | ||||||
|               "#FFFFFF", |  | ||||||
|               core.ui._buildFont(96, true) |  | ||||||
|             ); |  | ||||||
|           } |           } | ||||||
| 
 | 
 | ||||||
|           const img = core.material.images.images[this.type + ".webp"]; |           const img = core.material.images.images[this.type + ".webp"]; | ||||||
| @ -17326,10 +17139,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|           core.setTextAlign(ctx, "left"); |           core.setTextAlign(ctx, "left"); | ||||||
|           for (let i = 0; i < indexList.length; i++) { |           for (let i = 0; i < indexList.length; i++) { | ||||||
|             const text = this.musicname[indexList[i]]; |             const text = this.musicname[indexList[i]]; | ||||||
|             if ( |  | ||||||
|               this.musics.includes(this.musicMx[page][i]) || |  | ||||||
|               page !== this.musicMx.length - 1 |  | ||||||
|             ) { |  | ||||||
|             core.fillBoldText1( |             core.fillBoldText1( | ||||||
|               ctx, |               ctx, | ||||||
|               text, |               text, | ||||||
| @ -17342,14 +17151,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|               6, |               6, | ||||||
|               core.ui._buildFont(66, true) |               core.ui._buildFont(66, true) | ||||||
|             ); |             ); | ||||||
| 
 |  | ||||||
|             ctx.strokeStyle = "#FFFFFF"; |             ctx.strokeStyle = "#FFFFFF"; | ||||||
|             ctx.lineWidth = 3; |             ctx.lineWidth = 3; | ||||||
|             ctx.beginPath(); |             ctx.beginPath(); | ||||||
|             ctx.moveTo(900, posy); |             ctx.moveTo(900, posy); | ||||||
|             ctx.lineTo(1900, posy); |             ctx.lineTo(1900, posy); | ||||||
|             ctx.stroke(); |             ctx.stroke(); | ||||||
|             } |  | ||||||
|             posy += 100; |             posy += 100; | ||||||
|           } |           } | ||||||
|           core.fillBoldText1( |           core.fillBoldText1( | ||||||
| @ -17386,62 +17193,21 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|           ctx.strokeStyle = "#ffffff"; |           ctx.strokeStyle = "#ffffff"; | ||||||
|           ctx.lineWidth = 3; |           ctx.lineWidth = 3; | ||||||
| 
 | 
 | ||||||
|           core.fillText( |           ctx.fillStyle = "#ffffff"; | ||||||
|             ctx, |           ctx.font = "bold 96px Verdana"; | ||||||
|             "|", |           ctx.fillText("|", 60, 697); | ||||||
|             55, |           ctx.fillText("◀", 70, 700); | ||||||
|             697, |  | ||||||
|             "#FFFFFF", |  | ||||||
|             core.ui._buildFont(96, true) |  | ||||||
|           ); |  | ||||||
|           core.fillText( |  | ||||||
|             ctx, |  | ||||||
|             "◀", |  | ||||||
|             70, |  | ||||||
|             700, |  | ||||||
|             "#FFFFFF", |  | ||||||
|             core.ui._buildFont(96, true) |  | ||||||
|           ); |  | ||||||
| 
 |  | ||||||
|           ctx.beginPath(); |           ctx.beginPath(); | ||||||
|           ctx.arc(295, 670, 80, 0, 2 * Math.PI); |           ctx.arc(295, 670, 80, 0, 2 * Math.PI); | ||||||
|           ctx.stroke(); |           ctx.stroke(); | ||||||
|           if (this.stop) { |           if (this.stop) { | ||||||
|             core.fillText( |             ctx.fillText("▶", 245, 697); | ||||||
|               ctx, |  | ||||||
|               "▶", |  | ||||||
|               265, |  | ||||||
|               700, |  | ||||||
|               "#FFFFFF", |  | ||||||
|               core.ui._buildFont(96, true) |  | ||||||
|             ); |  | ||||||
|           } else { |           } else { | ||||||
|             core.fillText( |             ctx.fillText("||", 245, 694); | ||||||
|               ctx, |  | ||||||
|               "||", |  | ||||||
|               245, |  | ||||||
|               700, |  | ||||||
|               "#FFFFFF", |  | ||||||
|               core.ui._buildFont(96, true) |  | ||||||
|             ); |  | ||||||
|           } |           } | ||||||
|           core.fillText( |  | ||||||
|             ctx, |  | ||||||
|             "|", |  | ||||||
|             495, |  | ||||||
|             697, |  | ||||||
|             "#FFFFFF", |  | ||||||
|             core.ui._buildFont(96, true) |  | ||||||
|           ); |  | ||||||
|           core.fillText( |  | ||||||
|             ctx, |  | ||||||
|             "▶", |  | ||||||
|             450, |  | ||||||
|             700, |  | ||||||
|             "#FFFFFF", |  | ||||||
|             core.ui._buildFont(96, true) |  | ||||||
|           ); |  | ||||||
| 
 | 
 | ||||||
|  |           ctx.fillText("|", 490, 697); | ||||||
|  |           ctx.fillText("▶", 450, 700); | ||||||
|           ctx.font = "bold 48px Verdana"; |           ctx.font = "bold 48px Verdana"; | ||||||
|           ctx.fillText("音量", 350, 900); |           ctx.fillText("音量", 350, 900); | ||||||
|           ctx.beginPath(); |           ctx.beginPath(); | ||||||
| @ -17485,13 +17251,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|     core.ui.music = new musicclass(); |     core.ui.music = new musicclass(); | ||||||
|     main.dom.musicMode.onclick = function () { |     main.dom.musicMode.onclick = function () { | ||||||
|       //点击开始页面的CG MODE进入cg回廊
 |       //点击开始页面的CG MODE进入cg回廊
 | ||||||
|       if ( | 
 | ||||||
|         (core.getLocalStorage("musics") && |  | ||||||
|           core.getLocalStorage("musics").length === 0) || |  | ||||||
|         !core.getLocalStorage("musics") |  | ||||||
|       ) |  | ||||||
|         core.setLocalStorage("musics", ["theme.mp3"]); |  | ||||||
|       core.ui.music.musics = core.getLocalStorage("musics"); |  | ||||||
|       core.playBgm( |       core.playBgm( | ||||||
|         main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ |         main.core.ui.music.musicMx[main.core.ui.music.selection[0]][ | ||||||
|           main.core.ui.music.selection[1] |           main.core.ui.music.selection[1] | ||||||
| @ -17803,348 +17563,4 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { | |||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|   }, |   }, | ||||||
|   "intro&loop": function () { |  | ||||||
|     // 在此增加新插件
 |  | ||||||
|     this.introAndLoop = function (intro, time, loop) { |  | ||||||
|       core.playBgm(intro); |  | ||||||
|       setTimeout(() => { |  | ||||||
|         core.playBgm(loop); |  | ||||||
|       }, time * 1000); |  | ||||||
|     }; |  | ||||||
|   }, |  | ||||||
|   开局选项悬停: function () { |  | ||||||
|     // 在此增加新插件
 |  | ||||||
| 
 |  | ||||||
|     main.dom.playGame.addEventListener("mouseenter", () => { |  | ||||||
|       core.dom.playGame.style.backgroundColor = "#808080"; |  | ||||||
|     }); |  | ||||||
|     main.dom.playGame.addEventListener("mouseleave", () => { |  | ||||||
|       core.dom.playGame.style.backgroundColor = "transparent"; |  | ||||||
|     }); |  | ||||||
|     main.dom.playGame.addEventListener("touchmove", () => { |  | ||||||
|       core.dom.playGame.style.backgroundColor = "#808080"; |  | ||||||
|     }); |  | ||||||
|     main.dom.playGame.addEventListener("touchend", () => { |  | ||||||
|       core.dom.playGame.style.backgroundColor = "transparent"; |  | ||||||
|     }); |  | ||||||
|     main.dom.playGame.addEventListener("touchcancel", () => { |  | ||||||
|       core.dom.playGame.style.backgroundColor = "transparent"; |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     main.dom.loadGame.addEventListener("mouseenter", () => { |  | ||||||
|       core.dom.loadGame.style.backgroundColor = "#808080"; |  | ||||||
|     }); |  | ||||||
|     main.dom.loadGame.addEventListener("mouseleave", () => { |  | ||||||
|       core.dom.loadGame.style.backgroundColor = "transparent"; |  | ||||||
|     }); |  | ||||||
|     main.dom.loadGame.addEventListener("touchmove", () => { |  | ||||||
|       core.dom.loadGame.style.backgroundColor = "#808080"; |  | ||||||
|     }); |  | ||||||
|     main.dom.loadGame.addEventListener("touchend", () => { |  | ||||||
|       core.dom.loadGame.style.backgroundColor = "transparent"; |  | ||||||
|     }); |  | ||||||
|     main.dom.loadGame.addEventListener("touchcancel", () => { |  | ||||||
|       core.dom.loadGame.style.backgroundColor = "transparent"; |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     main.dom.CGMode.addEventListener("mouseenter", () => { |  | ||||||
|       core.dom.CGMode.style.backgroundColor = "#808080"; |  | ||||||
|     }); |  | ||||||
|     main.dom.CGMode.addEventListener("mouseleave", () => { |  | ||||||
|       core.dom.CGMode.style.backgroundColor = "transparent"; |  | ||||||
|     }); |  | ||||||
|     main.dom.CGMode.addEventListener("touchmove", () => { |  | ||||||
|       core.dom.CGMode.style.backgroundColor = "#808080"; |  | ||||||
|     }); |  | ||||||
|     main.dom.CGMode.addEventListener("touchend", () => { |  | ||||||
|       core.dom.CGMode.style.backgroundColor = "transparent"; |  | ||||||
|     }); |  | ||||||
|     main.dom.CGMode.addEventListener("touchcancel", () => { |  | ||||||
|       core.dom.CGMode.style.backgroundColor = "transparent"; |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     main.dom.musicMode.addEventListener("mouseenter", () => { |  | ||||||
|       core.dom.musicMode.style.backgroundColor = "#808080"; |  | ||||||
|     }); |  | ||||||
|     main.dom.musicMode.addEventListener("mouseleave", () => { |  | ||||||
|       core.dom.musicMode.style.backgroundColor = "transparent"; |  | ||||||
|     }); |  | ||||||
|     main.dom.musicMode.addEventListener("touchmove", () => { |  | ||||||
|       core.dom.musicMode.style.backgroundColor = "#808080"; |  | ||||||
|     }); |  | ||||||
|     main.dom.musicMode.addEventListener("touchend", () => { |  | ||||||
|       core.dom.musicMode.style.backgroundColor = "transparent"; |  | ||||||
|     }); |  | ||||||
|     main.dom.musicMode.addEventListener("touchcancel", () => { |  | ||||||
|       core.dom.musicMode.style.backgroundColor = "transparent"; |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     main.dom.replayGame.addEventListener("mouseenter", () => { |  | ||||||
|       core.dom.replayGame.style.backgroundColor = "#808080"; |  | ||||||
|     }); |  | ||||||
|     main.dom.replayGame.addEventListener("mouseleave", () => { |  | ||||||
|       core.dom.replayGame.style.backgroundColor = "transparent"; |  | ||||||
|     }); |  | ||||||
|     main.dom.replayGame.addEventListener("touchmove", () => { |  | ||||||
|       core.dom.replayGame.style.backgroundColor = "#808080"; |  | ||||||
|     }); |  | ||||||
|     main.dom.replayGame.addEventListener("touchend", () => { |  | ||||||
|       core.dom.replayGame.style.backgroundColor = "transparent"; |  | ||||||
|     }); |  | ||||||
|     main.dom.replayGame.addEventListener("touchcancel", () => { |  | ||||||
|       core.dom.replayGame.style.backgroundColor = "transparent"; |  | ||||||
|     }); |  | ||||||
|   }, |  | ||||||
|   天气叠加: function () { |  | ||||||
|     //使用方法:使用core.setWeather(天气,等级)来增加天气,使用core.setWeather()来清空天气
 |  | ||||||
|     // 天气叠加功能
 |  | ||||||
|     ////// 更改天气效果 //////
 |  | ||||||
|     control.prototype.setWeather = function (type, level) { |  | ||||||
|       // 非雨雪
 |  | ||||||
|       if (type == null) { |  | ||||||
|         Object.keys(core.control.weathers).forEach(function (one) { |  | ||||||
|           core.deleteCanvas("weather" + one); |  | ||||||
|         }); |  | ||||||
|         core.animateFrame.weather.type = []; |  | ||||||
|         core.animateFrame.weather.nodes = {}; |  | ||||||
|         core.animateFrame.weather.level = {}; |  | ||||||
|         core.animateFrame.weather.time = {}; |  | ||||||
|         return; |  | ||||||
|       } |  | ||||||
|       if (!core.animateFrame.weather.level || level == null) |  | ||||||
|         core.animateFrame.weather.level = {}; |  | ||||||
|       if (!core.animateFrame.weather.type) core.animateFrame.weather.type = []; |  | ||||||
|       level = core.clamp(parseInt(level) || 5, 1, 10); |  | ||||||
|       // 当前天气:则忽略
 |  | ||||||
|       if ( |  | ||||||
|         core.animateFrame.weather.type.includes(type) && |  | ||||||
|         level == core.animateFrame.weather.level[type] |  | ||||||
|       ) |  | ||||||
|         return; |  | ||||||
|       if (core.animateFrame.weather.nodes[type]) return; |  | ||||||
|       // 计算当前的宽高
 |  | ||||||
|       core.createCanvas( |  | ||||||
|         "weather" + type, |  | ||||||
|         0, |  | ||||||
|         0, |  | ||||||
|         core.__PIXELS__, |  | ||||||
|         core.__PIXELS__, |  | ||||||
|         80 |  | ||||||
|       ); |  | ||||||
|       core.animateFrame.weather.type.push(type); |  | ||||||
|       core.animateFrame.weather.level[type] = level; |  | ||||||
|       this._setWeather_createNodes(type, level); |  | ||||||
|     }; |  | ||||||
|     control.prototype._setWeather_createNodes = function (type, level) { |  | ||||||
|       var number = |  | ||||||
|         level * |  | ||||||
|         parseInt( |  | ||||||
|           (20 * core.bigmap.width * core.bigmap.height) / |  | ||||||
|             (core.__SIZE__ * core.__SIZE__) |  | ||||||
|         ); |  | ||||||
|       if (!core.animateFrame.weather.nodes[type]) |  | ||||||
|         core.animateFrame.weather.nodes[type] = []; |  | ||||||
|       switch (type) { |  | ||||||
|         case "rain": |  | ||||||
|           for (var a = 0; a < number; a++) { |  | ||||||
|             core.animateFrame.weather.nodes.rain.push({ |  | ||||||
|               x: Math.random() * core.bigmap.width * 32, |  | ||||||
|               y: Math.random() * core.bigmap.height * 32, |  | ||||||
|               l: Math.random() * 2.5, |  | ||||||
|               xs: -4 + Math.random() * 4 + 2, |  | ||||||
|               ys: Math.random() * 10 + 10, |  | ||||||
|             }); |  | ||||||
|           } |  | ||||||
|           break; |  | ||||||
|         case "snow": |  | ||||||
|           for (var a = 0; a < number; a++) { |  | ||||||
|             core.animateFrame.weather.nodes.snow.push({ |  | ||||||
|               x: Math.random() * core.bigmap.width * 32, |  | ||||||
|               y: Math.random() * core.bigmap.height * 32, |  | ||||||
|               r: Math.random() * 5 + 1, |  | ||||||
|               d: Math.random() * Math.min(level, 200), |  | ||||||
|             }); |  | ||||||
|           } |  | ||||||
|           break; |  | ||||||
|         case "fog": |  | ||||||
|           if (core.animateFrame.weather.fog) { |  | ||||||
|             core.animateFrame.weather.nodes[type] = [ |  | ||||||
|               { |  | ||||||
|                 level: number, |  | ||||||
|                 x: 0, |  | ||||||
|                 y: -core.__PIXELS__ / 2, |  | ||||||
|                 dx: -Math.random() * 1.5, |  | ||||||
|                 dy: Math.random(), |  | ||||||
|                 delta: 0.001, |  | ||||||
|               }, |  | ||||||
|             ]; |  | ||||||
|           } |  | ||||||
|           break; |  | ||||||
|         case "cloud": |  | ||||||
|           if (core.animateFrame.weather.cloud) { |  | ||||||
|             core.animateFrame.weather.nodes[type] = [ |  | ||||||
|               { |  | ||||||
|                 level: number, |  | ||||||
|                 x: 0, |  | ||||||
|                 y: -core.__PIXELS__ / 2, |  | ||||||
|                 dx: -Math.random() * 1.5, |  | ||||||
|                 dy: Math.random(), |  | ||||||
|                 delta: 0.001, |  | ||||||
|               }, |  | ||||||
|             ]; |  | ||||||
|           } |  | ||||||
|           break; |  | ||||||
|         case "sun": |  | ||||||
|           if (core.animateFrame.weather.sun) { |  | ||||||
|             // 直接绘制
 |  | ||||||
|             core.clearMap("weather" + type); |  | ||||||
|             core.setAlpha("weather" + type, level / 10); |  | ||||||
|             core.drawImage( |  | ||||||
|               "weather" + type, |  | ||||||
|               core.animateFrame.weather.sun, |  | ||||||
|               0, |  | ||||||
|               0, |  | ||||||
|               core.animateFrame.weather.sun.width, |  | ||||||
|               core.animateFrame.weather.sun.height, |  | ||||||
|               0, |  | ||||||
|               0, |  | ||||||
|               core.__PIXELS__, |  | ||||||
|               core.__PIXELS__ |  | ||||||
|             ); |  | ||||||
|             core.setAlpha("weather" + type, 1); |  | ||||||
|           } |  | ||||||
|           break; |  | ||||||
|       } |  | ||||||
|     }; |  | ||||||
|     core.registerAnimationFrame("weather", true, function (timestamp) { |  | ||||||
|       var weather = core.animateFrame.weather; |  | ||||||
|       if (!weather.type) return; |  | ||||||
|       weather.type.forEach(function (one) { |  | ||||||
|         if ( |  | ||||||
|           timestamp - weather.time[one] <= 30 || |  | ||||||
|           !core.dymCanvas["weather" + one] |  | ||||||
|         ) |  | ||||||
|           return; |  | ||||||
|         core.control["_animationFrame_weather_" + one](); |  | ||||||
|         weather.time[one] = timestamp; |  | ||||||
|       }); |  | ||||||
|     }); |  | ||||||
|     // 雨
 |  | ||||||
|     control.prototype._animationFrame_weather_rain = function () { |  | ||||||
|       var ctx = core.dymCanvas.weatherrain, |  | ||||||
|         ox = core.bigmap.offsetX, |  | ||||||
|         oy = core.bigmap.offsetY; |  | ||||||
|       core.clearMap("weatherrain"); |  | ||||||
|       ctx.strokeStyle = "rgba(174,194,224,0.8)"; |  | ||||||
|       ctx.lineWidth = 1; |  | ||||||
|       ctx.lineCap = "round"; |  | ||||||
|       core.animateFrame.weather.nodes.rain.forEach(function (p) { |  | ||||||
|         ctx.beginPath(); |  | ||||||
|         ctx.moveTo(p.x - ox, p.y - oy); |  | ||||||
|         ctx.lineTo(p.x + p.l * p.xs - ox, p.y + p.l * p.ys - oy); |  | ||||||
|         ctx.stroke(); |  | ||||||
|         p.x += p.xs; |  | ||||||
|         p.y += p.ys; |  | ||||||
|         if (p.x > core.bigmap.width * 32 || p.y > core.bigmap.height * 32) { |  | ||||||
|           p.x = Math.random() * core.bigmap.width * 32; |  | ||||||
|           p.y = -10; |  | ||||||
|         } |  | ||||||
|       }); |  | ||||||
|       ctx.fill(); |  | ||||||
|     }; |  | ||||||
|     // 雪
 |  | ||||||
|     control.prototype._animationFrame_weather_snow = function () { |  | ||||||
|       var ctx = core.dymCanvas.weathersnow, |  | ||||||
|         ox = core.bigmap.offsetX, |  | ||||||
|         oy = core.bigmap.offsetY; |  | ||||||
|       core.clearMap("weathersnow"); |  | ||||||
|       ctx.fillStyle = "rgba(255, 255, 255, 0.8)"; |  | ||||||
|       ctx.beginPath(); |  | ||||||
|       if (!core.animateFrame.weather.data) core.animateFrame.weather.data = {}; |  | ||||||
|       core.animateFrame.weather.data.snow = |  | ||||||
|         core.animateFrame.weather.data.snow || 0; |  | ||||||
|       core.animateFrame.weather.data.snow += 0.01; |  | ||||||
|       var angle = core.animateFrame.weather.data.snow; |  | ||||||
|       core.animateFrame.weather.nodes.snow.forEach(function (p) { |  | ||||||
|         ctx.moveTo(p.x - ox, p.y - oy); |  | ||||||
|         ctx.arc(p.x - ox, p.y - oy, p.r, 0, Math.PI * 2, true); |  | ||||||
|         // update
 |  | ||||||
|         p.x += Math.sin(angle) * core.animateFrame.weather.level.snow; |  | ||||||
|         p.y += Math.cos(angle + p.d) + 1 + p.r / 2; |  | ||||||
|         if ( |  | ||||||
|           p.x > core.bigmap.width * 32 + 5 || |  | ||||||
|           p.x < -5 || |  | ||||||
|           p.y > core.bigmap.height * 32 |  | ||||||
|         ) { |  | ||||||
|           if (Math.random() > 1 / 3) { |  | ||||||
|             p.x = Math.random() * core.bigmap.width * 32; |  | ||||||
|             p.y = -10; |  | ||||||
|           } else { |  | ||||||
|             if (Math.sin(angle) > 0) p.x = -5; |  | ||||||
|             else p.x = core.bigmap.width * 32 + 5; |  | ||||||
|             p.y = Math.random() * core.bigmap.height * 32; |  | ||||||
|           } |  | ||||||
|         } |  | ||||||
|       }); |  | ||||||
|       ctx.fill(); |  | ||||||
|     }; |  | ||||||
|     // 图片天气
 |  | ||||||
|     control.prototype.__animateFrame_weather_image = function (image, type) { |  | ||||||
|       if (!image) return; |  | ||||||
|       var node = core.animateFrame.weather.nodes[type][0]; |  | ||||||
|       core.setAlpha("weather" + type, node.level / 500); |  | ||||||
|       var wind = 1.5; |  | ||||||
|       var width = image.width, |  | ||||||
|         height = image.height; |  | ||||||
|       node.x += node.dx * wind; |  | ||||||
|       node.y += (2 * node.dy - 1) * wind; |  | ||||||
|       if (node.x + 3 * width <= core.__PIXELS__) { |  | ||||||
|         node.x += 4 * width; |  | ||||||
|         while (node.x > 0) node.x -= width; |  | ||||||
|       } |  | ||||||
|       node.dy += node.delta; |  | ||||||
|       if (node.dy >= 1) { |  | ||||||
|         node.delta = -0.001; |  | ||||||
|       } else if (node.dy <= 0) { |  | ||||||
|         node.delta = 0.001; |  | ||||||
|       } |  | ||||||
|       if (node.y + 3 * height <= core.__PIXELS__) { |  | ||||||
|         node.y += 4 * height; |  | ||||||
|         while (node.y > 0) node.y -= height; |  | ||||||
|       } else if (node.y >= 0) { |  | ||||||
|         node.y -= height; |  | ||||||
|       } |  | ||||||
|       for (var i = 0; i < 3; ++i) { |  | ||||||
|         for (var j = 0; j < 3; ++j) { |  | ||||||
|           if ( |  | ||||||
|             node.x + (i + 1) * width <= 0 || |  | ||||||
|             node.x + i * width >= core.__PIXELS__ || |  | ||||||
|             node.y + (j + 1) * height <= 0 || |  | ||||||
|             node.y + j * height >= core.__PIXELS__ |  | ||||||
|           ) |  | ||||||
|             continue; |  | ||||||
|           core.drawImage( |  | ||||||
|             "weather" + type, |  | ||||||
|             image, |  | ||||||
|             node.x + i * width, |  | ||||||
|             node.y + j * height |  | ||||||
|           ); |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|       core.setAlpha("weather" + type, 1); |  | ||||||
|     }; |  | ||||||
|     // 雾
 |  | ||||||
|     control.prototype._animationFrame_weather_fog = function () { |  | ||||||
|       core.clearMap("weatherfog"); |  | ||||||
|       this.__animateFrame_weather_image(core.animateFrame.weather.fog, "fog"); |  | ||||||
|     }; |  | ||||||
|     // 云
 |  | ||||||
|     control.prototype._animationFrame_weather_cloud = function () { |  | ||||||
|       core.clearMap("weathercloud"); |  | ||||||
|       this.__animateFrame_weather_image( |  | ||||||
|         core.animateFrame.weather.cloud, |  | ||||||
|         "cloud" |  | ||||||
|       ); |  | ||||||
|     }; |  | ||||||
|   }, |  | ||||||
| }; | }; | ||||||
|  | |||||||
							
								
								
									
										137
									
								
								styles.css
									
									
									
									
									
								
							
							
						
						
									
										137
									
								
								styles.css
									
									
									
									
									
								
							| @ -1,5 +1,4 @@ | |||||||
| html, | html, body { | ||||||
| body { |  | ||||||
|     margin: 0; |     margin: 0; | ||||||
|     padding: 0; |     padding: 0; | ||||||
|     width: 100%; |     width: 100%; | ||||||
| @ -90,7 +89,7 @@ body { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #startTopHint { | #startTopHint { | ||||||
|   color: #66ccff; |     color: #66CCFF; | ||||||
|     position: absolute; |     position: absolute; | ||||||
|     bottom: 0; |     bottom: 0; | ||||||
|     left: 5%; |     left: 5%; | ||||||
| @ -99,12 +98,12 @@ body { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #startBackground { | #startBackground { | ||||||
|   position: absolute; |     position:absolute; | ||||||
|   top: 50%; |     top:50%; | ||||||
|   left: 50%; |     left:50%; | ||||||
|     height: 100%; |     height: 100%; | ||||||
|     width: 100%; |     width: 100%; | ||||||
|   transform: translate(-50%, -50%); |     transform:translate(-50%,-50%); | ||||||
|     z-index: 260; |     z-index: 260; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -145,8 +144,8 @@ body { | |||||||
|     /* default value */ |     /* default value */ | ||||||
|     background-color: #000000; |     background-color: #000000; | ||||||
|     opacity: 0.55; |     opacity: 0.55; | ||||||
|   color: #ffffff; |     color: #FFFFFF; | ||||||
|   border: #ffffff 0px solid; |     border: #FFFFFF 0px solid; | ||||||
|     caret-color: #ffffff; |     caret-color: #ffffff; | ||||||
|     border-radius: 0px; |     border-radius: 0px; | ||||||
| } | } | ||||||
| @ -162,7 +161,7 @@ body { | |||||||
| .startButton { | .startButton { | ||||||
|     width: 100%; |     width: 100%; | ||||||
|     margin: 0; |     margin: 0; | ||||||
|   font: 1.2rem pala, sans-serif; | 	font:1.2rem "pala", sans-serif; | ||||||
|     font-weight: normal; |     font-weight: normal; | ||||||
|     display: block; |     display: block; | ||||||
|     cursor: pointer; |     cursor: pointer; | ||||||
| @ -217,19 +216,19 @@ body { | |||||||
|     left: 0; |     left: 0; | ||||||
|     padding: 3px; |     padding: 3px; | ||||||
| } | } | ||||||
| #statusBar .status { | #statusBar .status{ | ||||||
|     position: relative; |     position: relative; | ||||||
|     display: block; |     display: block; | ||||||
|     float: left; |     float: left; | ||||||
|     width: 100%; |     width: 100%; | ||||||
| } | } | ||||||
| .status img { | .status img{ | ||||||
|     vertical-align: middle; |     vertical-align: middle; | ||||||
|     width: auto; |     width: auto; | ||||||
|     height: 100%; |     height: 100%; | ||||||
|     max-height: 1.6em; |     max-height: 1.6em; | ||||||
| } | } | ||||||
| #statusBar span { | #statusBar span{ | ||||||
|     font: bold italic 1.1em Verdana; |     font: bold italic 1.1em Verdana; | ||||||
|     display: inline; |     display: inline; | ||||||
| } | } | ||||||
| @ -252,7 +251,7 @@ body { | |||||||
|     display: none; |     display: none; | ||||||
|     padding: 3px; |     padding: 3px; | ||||||
| } | } | ||||||
| #toolBar .tools { | #toolBar .tools{ | ||||||
|     position: relative; |     position: relative; | ||||||
|     display: block; |     display: block; | ||||||
|     float: left; |     float: left; | ||||||
| @ -269,12 +268,7 @@ p#hard { | |||||||
|     word-break: keep-all; |     word-break: keep-all; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| span#poison, | span#poison, span#weak, span#curse, span#pickaxe, span#bomb, span#fly { | ||||||
| span#weak, |  | ||||||
| span#curse, |  | ||||||
| span#pickaxe, |  | ||||||
| span#bomb, |  | ||||||
| span#fly { |  | ||||||
|     font-style: normal; |     font-style: normal; | ||||||
|     font-size: 1em; |     font-size: 1em; | ||||||
| } | } | ||||||
| @ -356,8 +350,8 @@ p#name { | |||||||
|     position: fixed; |     position: fixed; | ||||||
|     top: 0; |     top: 0; | ||||||
|     left: 0; |     left: 0; | ||||||
|   background: rgba(127, 127, 127, 0.6); |     background: rgba(127,127,127,0.6); | ||||||
|   z-index: 2000; |     z-index: 2000 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #inputDialog { | #inputDialog { | ||||||
| @ -383,7 +377,7 @@ p#name { | |||||||
|     margin-bottom: 10px; |     margin-bottom: 10px; | ||||||
|     padding: 5px 3px; |     padding: 5px 3px; | ||||||
|     border: 1px solid; |     border: 1px solid; | ||||||
|   background: #f0f0f0; |     background: #F0F0F0; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #inputYes { | #inputYes { | ||||||
| @ -392,37 +386,24 @@ p#name { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #inputNo { | #inputNo { | ||||||
|   float: right; |     float:right; | ||||||
|     margin-right: 10%; |     margin-right: 10%; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #_selector, | #_selector, ._uievent_selector { | ||||||
| ._uievent_selector { |  | ||||||
|     animation: selector 2s ease-in-out 0s infinite normal none running; |     animation: selector 2s ease-in-out 0s infinite normal none running; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @-webkit-keyframes selector { | @-webkit-keyframes selector { | ||||||
|   0% { |     0% { opacity: 0.95; } | ||||||
|     opacity: 0.95; |     50% { opacity: 0.55; } | ||||||
|   } |     100% { opacity: 0.95; } | ||||||
|   50% { |  | ||||||
|     opacity: 0.55; |  | ||||||
|   } |  | ||||||
|   100% { |  | ||||||
|     opacity: 0.95; |  | ||||||
|   } |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @keyframes selector { | @keyframes selector { | ||||||
|   0% { |     0% { opacity: 0.95; } | ||||||
|     opacity: 0.95; |     50% { opacity: 0.55; } | ||||||
|   } |     100% { opacity: 0.95; } | ||||||
|   50% { |  | ||||||
|     opacity: 0.55; |  | ||||||
|   } |  | ||||||
|   100% { |  | ||||||
|     opacity: 0.95; |  | ||||||
|   } |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #next { | #next { | ||||||
| @ -435,8 +416,8 @@ p#name { | |||||||
|     border-bottom-style: solid; |     border-bottom-style: solid; | ||||||
|     border-right-width: 4px; |     border-right-width: 4px; | ||||||
|     border-right-style: solid; |     border-right-style: solid; | ||||||
|   -webkit-animation: next 0.5s ease-in-out alternate infinite; |     -webkit-animation: next .5s ease-in-out alternate infinite; | ||||||
|   animation: next 0.5s ease-in-out alternate infinite; |     animation: next .5s ease-in-out alternate infinite; | ||||||
|     left: 0; |     left: 0; | ||||||
|     top: 0; |     top: 0; | ||||||
|     opacity: 0.7; |     opacity: 0.7; | ||||||
| @ -486,27 +467,15 @@ p#name { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @-webkit-keyframes startImage { | @-webkit-keyframes startImage { | ||||||
|   0% { |     0% { opacity: 0; } | ||||||
|     opacity: 0; |     60% { opacity: 1; } | ||||||
|   } |     100% { opacity: 0; } | ||||||
|   60% { |  | ||||||
|     opacity: 1; |  | ||||||
|   } |  | ||||||
|   100% { |  | ||||||
|     opacity: 0; |  | ||||||
|   } |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @keyframes startImage { | @keyframes startImage { | ||||||
|   0% { |     0% { opacity: 0; } | ||||||
|     opacity: 0; |     60% { opacity: 1; } | ||||||
|   } |     100% { opacity: 0; } | ||||||
|   60% { |  | ||||||
|     opacity: 1; |  | ||||||
|   } |  | ||||||
|   100% { |  | ||||||
|     opacity: 0; |  | ||||||
|   } |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .startImageDivAnimation { | .startImageDivAnimation { | ||||||
| @ -515,21 +484,13 @@ p#name { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @-webkit-keyframes startImageDivDisappear { | @-webkit-keyframes startImageDivDisappear { | ||||||
|   0% { |     0% { opacity: 1 } | ||||||
|     opacity: 1; |     100% { opacity: 0 } | ||||||
|   } |  | ||||||
|   100% { |  | ||||||
|     opacity: 0; |  | ||||||
|   } |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @keyframes startImageDivDisappear { | @keyframes startImageDivDisappear { | ||||||
|   0% { |     0% { opacity: 1 } | ||||||
|     opacity: 1; |     100% { opacity: 0 } | ||||||
|   } |  | ||||||
|   100% { |  | ||||||
|     opacity: 0; |  | ||||||
|   } |  | ||||||
| } | } | ||||||
| #ui-editor { | #ui-editor { | ||||||
|     z-index: 9999; |     z-index: 9999; | ||||||
| @ -556,27 +517,15 @@ p#name { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @keyframes warning { | @keyframes warning { | ||||||
|   0 % { |     0 % { text-shadow: 0px 0px 9px rgba(255, 0, 0, 0.5), 0px 0px 6px rgb(129, 0, 0);} | ||||||
|     text-shadow: 0px 0px 9px rgba(255, 0, 0, 0.5), 0px 0px 6px rgb(129, 0, 0); |     50 % { text-shadow: 0px 0px 30px rgba(255, 0, 0, 1), 0px 0px 6px rgb(129, 0, 0);} | ||||||
|   } |     100 % { text-shadow: 0px 0px 9px rgba(255, 0, 0, 0.5), 0px 0px 6px rgb(129, 0, 0);} | ||||||
|   50 % { |  | ||||||
|     text-shadow: 0px 0px 30px rgba(255, 0, 0, 1), 0px 0px 6px rgb(129, 0, 0); |  | ||||||
|   } |  | ||||||
|   100 % { |  | ||||||
|     text-shadow: 0px 0px 9px rgba(255, 0, 0, 0.5), 0px 0px 6px rgb(129, 0, 0); |  | ||||||
|   } |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @-webkit - keyframes warning { | @-webkit - keyframes warning { | ||||||
|   0 % { |     0 % { text-shadow: 0px 0px 9px rgba(255, 0, 0, 0.5), 0px 0px 6px rgb(129, 0, 0);} | ||||||
|     text-shadow: 0px 0px 9px rgba(255, 0, 0, 0.5), 0px 0px 6px rgb(129, 0, 0); |     50 % { text-shadow: 0px 0px 30px rgba(255, 0, 0, 1), 0px 0px 6px rgb(129, 0, 0);} | ||||||
|   } |     100 % { text-shadow: 0px 0px 9px rgba(255, 0, 0, 0.5), 0px 0px 6px rgb(129, 0, 0);} | ||||||
|   50 % { |  | ||||||
|     text-shadow: 0px 0px 30px rgba(255, 0, 0, 1), 0px 0px 6px rgb(129, 0, 0); |  | ||||||
|   } |  | ||||||
|   100 % { |  | ||||||
|     text-shadow: 0px 0px 9px rgba(255, 0, 0, 0.5), 0px 0px 6px rgb(129, 0, 0); |  | ||||||
|   } |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .gameCanvas { | .gameCanvas { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user