private void PlayKillNotify(string KillerSrc, string VictimSrc, KillDetailInfoType Type, bool bSrcAllies, bool bSelfKillORKilled, ActorTypeDef actorType) { if (Type == KillDetailInfoType.Info_Type_AllDead) { Debug.Log("---KN 播团灭"); } this.Show(); UT.ResetTimer(this.hideTimer, false); string str = KillNotifyUT.GetSoundEvent(Type, bSrcAllies, bSelfKillORKilled, actorType); if (!string.IsNullOrEmpty(str)) { Singleton <CSoundManager> .GetInstance().PlayBattleSound2D(str); } string animation = KillNotifyUT.GetAnimation(Type, bSrcAllies); if (!string.IsNullOrEmpty(animation) && (this.animatorScript != null)) { this.animatorScript.PlayAnimator(animation); } KillNotifyUT.SetImageSprite(this.KillerImg, KillerSrc); if (string.IsNullOrEmpty(KillerSrc)) { this.SetKillerShow(false); } else { this.SetKillerShow(true); } bool flag = (((((Type == KillDetailInfoType.Info_Type_DestroyTower) || (Type == KillDetailInfoType.Info_Type_DestroyBase)) || ((Type == KillDetailInfoType.Info_Type_AllDead) || (Type == KillDetailInfoType.Info_Type_RunningMan))) || (((Type == KillDetailInfoType.Info_Type_Reconnect) || (Type == KillDetailInfoType.Info_Type_Disconnect)) || ((Type == KillDetailInfoType.Info_Type_KillDragon) || (Type == KillDetailInfoType.Info_Type_Game_Start_Wel)))) || (((Type == KillDetailInfoType.Info_Type_Soldier_Activate_Countdown3) || (Type == KillDetailInfoType.Info_Type_Soldier_Activate_Countdown5)) || ((Type == KillDetailInfoType.Info_Type_Soldier_Activate) || (Type == KillDetailInfoType.Info_Type_KillBIGDRAGON)))) || (Type == KillDetailInfoType.Info_Type_KillBARON); this.SetVictimShow(!flag); KillNotifyUT.SetImageSprite(this.VictimImg, VictimSrc); this.IsPlaying = true; }
private void PlayKillNotify(ref KillInfo killInfo) { string killerImgSrc = killInfo.KillerImgSrc; string victimImgSrc = killInfo.VictimImgSrc; string[] assistImgSrc = killInfo.assistImgSrc; KillDetailInfoType msgType = killInfo.MsgType; bool bSrcAllies = killInfo.bSrcAllies; bool bPlayerSelf_KillOrKilled = killInfo.bPlayerSelf_KillOrKilled; ActorTypeDef actorType = killInfo.actorType; string spt = (!bSrcAllies) ? KillNotify.red_assist_frame_icon : KillNotify.blue_assist_frame_icon; if (msgType == KillDetailInfoType.Info_Type_AllDead) { Debug.Log("---KN 播团灭"); } this.Show(); UT.ResetTimer(this.hideTimer, false); string soundEvent = KillNotifyUT.GetSoundEvent(msgType, bSrcAllies, bPlayerSelf_KillOrKilled, actorType); if (!string.IsNullOrEmpty(soundEvent)) { Singleton <CSoundManager> .GetInstance().PlayBattleSound2D(soundEvent); } string animation = KillNotifyUT.GetAnimation(msgType, bSrcAllies); if (!string.IsNullOrEmpty(animation) && this.animatorScript != null) { this.animatorScript.PlayAnimator(animation); } KillNotifyUT.SetImageSprite(this.KillerImg, killerImgSrc); if (string.IsNullOrEmpty(killerImgSrc)) { this.SetKillerShow(false); } else { this.SetKillerShow(true); } bool flag = msgType == KillDetailInfoType.Info_Type_DestroyTower || msgType == KillDetailInfoType.Info_Type_DestroyBase || msgType == KillDetailInfoType.Info_Type_AllDead || msgType == KillDetailInfoType.Info_Type_RunningMan || msgType == KillDetailInfoType.Info_Type_Reconnect || msgType == KillDetailInfoType.Info_Type_Disconnect || msgType == KillDetailInfoType.Info_Type_Kill_3V3_Dragon || msgType == KillDetailInfoType.Info_Type_Game_Start_Wel || msgType == KillDetailInfoType.Info_Type_Soldier_Activate_Countdown3 || msgType == KillDetailInfoType.Info_Type_Soldier_Activate_Countdown5 || msgType == KillDetailInfoType.Info_Type_Soldier_Activate || msgType == KillDetailInfoType.Info_Type_Kill_5V5_SmallDragon || msgType == KillDetailInfoType.Info_Type_Kill_5V5_BigDragon; this.SetVictimShow(!flag); KillNotifyUT.SetImageSprite(this.VictimImg, victimImgSrc); int num = 0; if (assistImgSrc != null) { for (int i = 0; i < 4; i++) { if (!string.IsNullOrEmpty(assistImgSrc[i])) { if (this.assistHeads[i].gameObject != null) { this.assistHeads[i].gameObject.CustomSetActive(true); } KillNotifyUT.SetImageSprite(this.assistHeads[i], assistImgSrc[i]); KillNotifyUT.SetImageSprite(this.assistHeadFrames[i], spt); num++; } else if (this.assistHeads[i].gameObject != null) { this.assistHeads[i].gameObject.CustomSetActive(false); } } } this.assistList.CustomSetActive(num > 0); this.IsPlaying = true; }
private void PlayKillNotify(ref KillInfo killInfo) { string killerImgSrc = killInfo.KillerImgSrc; string victimImgSrc = killInfo.VictimImgSrc; string[] assistImgSrc = killInfo.assistImgSrc; KillDetailInfoType killDetailInfoType = killInfo.MsgType; bool bSrcAllies = killInfo.bSrcAllies; bool bPlayerSelf_KillOrKilled = killInfo.bPlayerSelf_KillOrKilled; ActorTypeDef actorType = killInfo.actorType; string spt = bSrcAllies ? KillNotify.blue_assist_frame_icon : KillNotify.red_assist_frame_icon; this.Show(); UT.ResetTimer(this.hideTimer, false); string soundEvent = KillNotifyUT.GetSoundEvent(killDetailInfoType, bSrcAllies, bPlayerSelf_KillOrKilled, actorType); if (!string.IsNullOrEmpty(soundEvent)) { Singleton <CSoundManager> .GetInstance().PlayBattleSound2D(soundEvent); } string animation = KillNotifyUT.GetAnimation(killDetailInfoType, bSrcAllies); if (!string.IsNullOrEmpty(animation) && this.animatorScript != null) { this.animatorScript.PlayAnimator(animation); } KillNotifyUT.SetImageSprite(this.KillerImg, killerImgSrc); if (string.IsNullOrEmpty(killerImgSrc) || killInfo.bSuicide) { this.SetKillerShow(false); } else { this.SetKillerShow(true); } bool flag = killDetailInfoType == KillDetailInfoType.Info_Type_DestroyTower || killDetailInfoType == KillDetailInfoType.Info_Type_DestroyBase || killDetailInfoType == KillDetailInfoType.Info_Type_AllDead || killDetailInfoType == KillDetailInfoType.Info_Type_RunningMan || killDetailInfoType == KillDetailInfoType.Info_Type_Reconnect || killDetailInfoType == KillDetailInfoType.Info_Type_Disconnect || killDetailInfoType == KillDetailInfoType.Info_Type_Kill_3V3_Dragon || killDetailInfoType == KillDetailInfoType.Info_Type_Game_Start_Wel || killDetailInfoType == KillDetailInfoType.Info_Type_Soldier_Activate_Countdown3 || killDetailInfoType == KillDetailInfoType.Info_Type_Soldier_Activate_Countdown5 || killDetailInfoType == KillDetailInfoType.Info_Type_Soldier_Activate || killDetailInfoType == KillDetailInfoType.Info_Type_Kill_5V5_SmallDragon || killDetailInfoType == KillDetailInfoType.Info_Type_Kill_5V5_BigDragon || killDetailInfoType == KillDetailInfoType.Info_Type_5V5SmallDragon_Suicide; this.SetVictimShow(!flag); KillNotifyUT.SetImageSprite(this.VictimImg, victimImgSrc); int num = 0; if (assistImgSrc != null && killDetailInfoType != KillDetailInfoType.Info_Type_AllDead) { for (int i = 0; i < 4; i++) { if (!string.IsNullOrEmpty(assistImgSrc[i])) { if (this.assistHeads[i].gameObject != null) { this.assistHeads[i].gameObject.CustomSetActive(true); } KillNotifyUT.SetImageSprite(this.assistHeads[i], assistImgSrc[i]); KillNotifyUT.SetImageSprite(this.assistHeadFrames[i], spt); num++; } else if (this.assistHeads[i].gameObject != null) { this.assistHeads[i].gameObject.CustomSetActive(false); } } } this.assistList.CustomSetActive(num > 0); this.IsPlaying = true; bool flag2 = false; if (Singleton <GamePlayerCenter> .instance.GetHostPlayer() != null && Singleton <GamePlayerCenter> .instance.GetHostPlayer().Captain&& Singleton <GamePlayerCenter> .instance.GetHostPlayer().Captain.handle.ObjID == killInfo.killerObjID) { flag2 = true; } if ((killDetailInfoType == KillDetailInfoType.Info_Type_Odyssey || killDetailInfoType == KillDetailInfoType.Info_Type_QuataryKill || killDetailInfoType == KillDetailInfoType.Info_Type_PentaKill || killDetailInfoType == KillDetailInfoType.Info_Type_TripleKill) && flag2) { if (killDetailInfoType == KillDetailInfoType.Info_Type_Odyssey) { killDetailInfoType = KillDetailInfoType.Info_Type_Legendary; } MonoSingleton <TGPSDKSys> .GetInstance().SendGameEvent2(killDetailInfoType); } }