private void Show(CSignalTips data, CUIFormScript formScript) { if (data != null) { 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 str = !data.m_isHostPlayer ? S_Bg_Blue : S_Bg_Green; if (this.bg_icon == null) { return; } Image component = this.bg_icon.GetComponent <Image>(); if ((component != null) && !string.IsNullOrEmpty(str)) { component.SetSprite(str, formScript, true, false, false); } ResSignalInfo info2 = GameDataMgr.signalDatabin.GetDataByKey(data.m_signalID); if (info2 == null) { return; } this.signal_icon.CustomSetActive(true); if (this.signal_icon == null) { return; } Image image = this.signal_icon.GetComponent <Image>(); if (image != null) { image.SetSprite(info2.szUIIcon, formScript, true, false, false); } if (this.signal_txt != null) { this.signal_txt.text = info2.szText; } if (data.m_elementType < 1) { this.rightIcon.CustomSetActive(false); return; } Image image3 = this.rightIcon.GetComponent <Image>(); if (image3 == null) { return; } switch (data.m_elementType) { case 1: image3.SetSprite(S_kn_Tower_Icon, formScript, true, false, false); goto Label_021B; case 2: image3.SetSprite(S_Base_blue_Icon, formScript, true, false, false); goto Label_021B; case 3: { ResHeroCfgInfo heroCfgInfo = GameDataMgr.heroDatabin.GetDataByKey(data.m_targetHeroID); if (heroCfgInfo != null) { this.SetHeroHeadIcon(image3, formScript, heroCfgInfo); goto Label_021B; } return; } case 4: image3.SetSprite(S_Dragon_big_Icon, formScript, true, false, false); goto Label_021B; case 5: image3.SetSprite(S_Dragon_small_Icon, formScript, true, false, false); goto Label_021B; case 6: image3.SetSprite(S_kn_dragon_Icon, formScript, true, false, false); goto Label_021B; } } return; Label_021B: this.rightIcon.CustomSetActive(true); }
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); } }
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_Blue : CSignalTipShower.S_Bg_Green; 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.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: component3.SetSprite(CSignalTipShower.S_Dragon_big_Icon, formScript, true, false, false, false); break; case 5: component3.SetSprite(CSignalTipShower.S_kn_dragon_Icon, formScript, true, false, false, false); break; case 6: component3.SetSprite(CSignalTipShower.S_kn_dragon_Icon, formScript, true, false, false, false); break; default: return; } this.rightIcon.CustomSetActive(true); } else { this.rightIcon.CustomSetActive(false); } }