优化一起击剑、一起起飞、起飞、击剑
							parent
							
								
									ee77f3fe4b
								
							
						
					
					
						commit
						8855992e50
					
				
							
								
								
									
										66
									
								
								js/handle.js
								
								
								
								
							
							
						
						
									
										66
									
								
								js/handle.js
								
								
								
								
							|  | @ -179,8 +179,8 @@ function receiveMessage(event) | ||||||
|     if (highList!=undefined && highList.length > 0) { |     if (highList!=undefined && highList.length > 0) { | ||||||
|         leaderInfo = highList[0] |         leaderInfo = highList[0] | ||||||
|     } |     } | ||||||
| 	leaderInfo = '内有猛犬小心' | 	// leaderInfo = '内有猛犬小心'
 | ||||||
| 	// leaderInfo = '饺子吃肉肉'
 | 	leaderInfo = '饺子吃肉肉' | ||||||
|     // uid是否存在 不存在则存入uidObj
 |     // uid是否存在 不存在则存入uidObj
 | ||||||
|     let isNew = 0 |     let isNew = 0 | ||||||
| 
 | 
 | ||||||
|  | @ -293,29 +293,29 @@ function receiveMessage(event) | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		//领舞起飞
 | 		//领舞起飞
 | ||||||
| 		// if(leader.text==="起飞"){
 | 		if(leader.text==="起飞"){ | ||||||
| 		// 	if(firTimes==0){
 | 			if(firTimes==0){ | ||||||
| 		// 		firTimes++;
 | 				firTimes++; | ||||||
| 		// 		$('.stick').removeClass('stick-swing');
 | 				$('.stick').removeClass('stick-swing'); | ||||||
| 		// 		$('.stick').addClass('stick-go');
 | 				$('.stick').addClass('stick-go'); | ||||||
| 		// 		setTimeout(()=>{
 | 				setTimeout(()=>{ | ||||||
| 		// 			$('.stick').removeClass('stick-go');
 | 					$('.stick').removeClass('stick-go'); | ||||||
| 		// 			$('.stick').addClass('stick-swing');
 | 					$('.stick').addClass('stick-swing'); | ||||||
| 		// 			firTimes = 0;
 | 					firTimes = 0; | ||||||
| 		// 		},6000)
 | 				},6000) | ||||||
| 		// 	}
 | 			} | ||||||
| 		// }
 | 		} | ||||||
| 		//一起击剑
 | 		//一起击剑
 | ||||||
| 		// if(leader.text==="一起击剑"){
 | 		if(leader.text==="一起击剑"){ | ||||||
| 		// 	if(firTimes==0){
 | 			if(firTimes==0){ | ||||||
| 		// 		firTimes++;
 | 				firTimes++; | ||||||
| 		// 		$('.stick').addClass('stickcome');
 | 				$('.stick').addClass('stickcome'); | ||||||
| 		// 		setTimeout(()=>{
 | 				setTimeout(()=>{ | ||||||
| 		// 			$('.stick').removeClass('stickcome');
 | 					$('.stick').removeClass('stickcome'); | ||||||
| 		// 			firTimes = 0;
 | 					firTimes = 0; | ||||||
| 		// 		},6000)
 | 				},6000) | ||||||
| 		// 	}
 | 			} | ||||||
| 		// }
 | 		} | ||||||
| 		 | 		 | ||||||
| 		// 领舞喊一起喊
 | 		// 领舞喊一起喊
 | ||||||
|         if (leader.text.length >= 4) { |         if (leader.text.length >= 4) { | ||||||
|  | @ -333,15 +333,15 @@ function receiveMessage(event) | ||||||
| 			allDancing(leader.event); | 			allDancing(leader.event); | ||||||
| 		} | 		} | ||||||
| 		// 领舞喊荧光棒事件
 | 		// 领舞喊荧光棒事件
 | ||||||
| 		if(getLeaderFluoEvent(leader.text)!=''){ | 		// if(getLeaderFluoEvent(leader.text)!=''){
 | ||||||
| 			if(firTimes==0){//防多次说话
 | 		// 	if(firTimes==0){//防多次说话
 | ||||||
| 				firTimes++; | 		// 		firTimes++;
 | ||||||
| 				console.log(getLeaderFluoEvent(leader.text)); | 		// 		console.log(getLeaderFluoEvent(leader.text));
 | ||||||
| 				setTimeout(()=>{ | 		// 		setTimeout(()=>{
 | ||||||
| 					firTimes = 0; | 		// 			firTimes = 0;
 | ||||||
| 				},5000) | 		// 		},5000)
 | ||||||
| 			} | 		// 	}
 | ||||||
| 		} | 		// }
 | ||||||
|     } |     } | ||||||
|     // -------------------- 每条弹幕处理 end -----------------------
 |     // -------------------- 每条弹幕处理 end -----------------------
 | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue