public void Init(CUIFormScript formObj) { this.IsPlaying = false; Singleton <EventRouter> .instance.AddEventHandler <KillDetailInfo>(EventID.AchievementRecorderEvent, new Action <KillDetailInfo>(this.OnAchievementEvent)); this.node = Utility.FindChild(formObj.gameObject, "KillNotify_New"); this.animatorScript = Utility.GetComponetInChild <CUIAnimatorScript>(this.node, "KillNotify_Sub"); this.KillerImg = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/KillerHead/KillerImg"); this.VictimImg = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/VictimHead/VictimImg"); this.killerHead = Utility.FindChild(this.node, "KillNotify_Sub/KillerHead"); this.VictimHead = Utility.FindChild(this.node, "KillNotify_Sub/VictimHead"); this.Hide(); this.hideTimer = Singleton <CTimerManager> .GetInstance().AddTimer(HideTime, -1, new CTimer.OnTimeUpHandler(this.OnPlayEnd)); Singleton <CTimerManager> .GetInstance().PauseTimer(this.hideTimer); this.play_delta_timer = Singleton <CTimerManager> .GetInstance().AddTimer(s_play_deltaTime, -1, new CTimer.OnTimeUpHandler(this.On_Play_DeltaEnd)); Singleton <CTimerManager> .GetInstance().PauseTimer(this.play_delta_timer); SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); if ((curLvelContext != null) && curLvelContext.IsFireHolePlayMode()) { this.sub_sys = new FireHoleKillNotify(); } }
private void onDragon_Dead(ActorRoot actor) { DragonIcon.DragonNode dragonNode = this.getDragonNode(actor.ObjID, actor.ActorControl.GetActorSubSoliderType()); if (dragonNode != null) { dragonNode.ShowDead(actor.ActorControl.IsDeadState); dragonNode.objid = 0u; SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); if (curLvelContext != null && curLvelContext.IsFireHolePlayMode()) { dragonNode.Recycle(); } } }
private void onDragon_Dead(ActorRoot actor) { DragonNode node = this.getDragonNode(actor.ObjID, actor.ActorControl.GetActorSubSoliderType()); if (node != null) { node.SetData(actor.gameObject.transform.position, actor.ActorControl.GetActorSubSoliderType(), actor.ObjID, this.m_b5v5); node.ShowDead(actor.ActorControl.IsDeadState); node.objid = 0; SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); if ((curLvelContext != null) && curLvelContext.IsFireHolePlayMode()) { node.Recycle(); } } }
public void Init() { this.IsPlaying = false; Singleton <EventRouter> .get_instance().AddEventHandler <KillDetailInfo>(EventID.AchievementRecorderEvent, new Action <KillDetailInfo>(this.OnAchievementEvent)); this.m_formScript = KillNotify.GetKillNotifyFormScript(); this.node = Utility.FindChild(this.m_formScript.gameObject, "KillNotify_New"); this.animatorScript = Utility.GetComponetInChild <CUIAnimatorScript>(this.node, "KillNotify_Sub"); this.KillerImg = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/KillerHead/KillerImg"); this.VictimImg = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/VictimHead/VictimImg"); this.killerHead = Utility.FindChild(this.node, "KillNotify_Sub/KillerHead"); this.VictimHead = Utility.FindChild(this.node, "KillNotify_Sub/VictimHead"); this.assistList = Utility.FindChild(this.node, "KillNotify_Sub/AssistHeadList"); this.assistHeads[0] = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/AssistHeadList/Pl_Assist/Pl_Head/Head_1"); this.assistHeads[1] = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/AssistHeadList/Pl_Assist/Pl_Head/Head_2"); this.assistHeads[2] = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/AssistHeadList/Pl_Assist/Pl_Head/Head_3"); this.assistHeads[3] = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/AssistHeadList/Pl_Assist/Pl_Head/Head_4"); this.assistHeadFrames[0] = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/AssistHeadList/Pl_Assist/Pl_Head/Head_1/Frame"); this.assistHeadFrames[1] = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/AssistHeadList/Pl_Assist/Pl_Head/Head_2/Frame"); this.assistHeadFrames[2] = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/AssistHeadList/Pl_Assist/Pl_Head/Head_3/Frame"); this.assistHeadFrames[3] = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/AssistHeadList/Pl_Assist/Pl_Head/Head_4/Frame"); this.Hide(); this.hideTimer = Singleton <CTimerManager> .GetInstance().AddTimer(KillNotify.HideTime, -1, new CTimer.OnTimeUpHandler(this.OnPlayEnd)); Singleton <CTimerManager> .GetInstance().PauseTimer(this.hideTimer); this.play_delta_timer = Singleton <CTimerManager> .GetInstance().AddTimer(KillNotify.s_play_deltaTime, -1, new CTimer.OnTimeUpHandler(this.On_Play_DeltaEnd)); Singleton <CTimerManager> .GetInstance().PauseTimer(this.play_delta_timer); SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); if (curLvelContext != null && curLvelContext.IsFireHolePlayMode()) { this.sub_sys = new FireHoleKillNotify(); } }
private void Show(CSignalTips data, CUIFormScript formScript) { if (data == null) { return; } this.signal_node.CustomSetActive(true); this.inbattlemsg_node.CustomSetActive(false); ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(data.m_heroID); if (dataByKey == null) { return; } this.SetHeroHeadIcon(this.leftIcon.gameObject.GetComponent <Image>(), formScript, dataByKey); string text = data.m_isHostPlayer ? CSignalTipShower.S_Bg_Green : CSignalTipShower.S_Bg_Blue; if (this.bg_icon == null) { return; } Image component = this.bg_icon.GetComponent <Image>(); if (component != null && !string.IsNullOrEmpty(text)) { component.SetSprite(text, formScript, true, false, false, false); } ResSignalInfo dataByKey2 = GameDataMgr.signalDatabin.GetDataByKey((long)data.m_signalID); if (dataByKey2 == null) { return; } this.signal_icon.CustomSetActive(true); if (this.signal_icon == null) { return; } Image component2 = this.signal_icon.GetComponent <Image>(); if (component2 != null) { component2.SetSprite(dataByKey2.szUIIcon, formScript, true, false, false, false); } if (this.signal_txt != null) { this.signal_txt.set_text(dataByKey2.szText); } if (data.m_elementType >= 1) { Image component3 = this.rightIcon.GetComponent <Image>(); if (component3 == null) { return; } switch (data.m_elementType) { case 1: component3.SetSprite(CSignalTipShower.S_kn_Tower_Icon, formScript, true, false, false, false); break; case 2: component3.SetSprite(CSignalTipShower.S_Base_blue_Icon, formScript, true, false, false, false); break; case 3: { ResHeroCfgInfo dataByKey3 = GameDataMgr.heroDatabin.GetDataByKey(data.m_targetHeroID); if (dataByKey3 == null) { return; } this.SetHeroHeadIcon(component3, formScript, dataByKey3); break; } case 4: { SLevelContext curLvelContext = Singleton <BattleLogic> .instance.GetCurLvelContext(); if (curLvelContext != null && curLvelContext.IsFireHolePlayMode()) { component3.SetSprite(CSignalTipShower.S_kn_dragon_Icon_3v3, formScript, true, false, false, false); } else { component3.SetSprite(KillNotify.soldier_bigdragon_icon, formScript, true, false, false, false); } break; } case 5: { SLevelContext curLvelContext2 = Singleton <BattleLogic> .instance.GetCurLvelContext(); if (curLvelContext2 != null && curLvelContext2.IsFireHolePlayMode()) { component3.SetSprite(CSignalTipShower.S_kn_dragon_Icon_3v3, formScript, true, false, false, false); } else { component3.SetSprite(CSignalTipShower.S_kn_dragon_Icon, formScript, true, false, false, false); } break; } case 6: component3.SetSprite(CSignalTipShower.S_kn_dragon_Icon_3v3, formScript, true, false, false, false); break; default: return; } this.rightIcon.CustomSetActive(true); } else { this.rightIcon.CustomSetActive(false); } }