public CharNameBillboardSprite CreateNameSprite() { if (this.m_pkHeadUpRoot == null) { return(null); } this.DisposeGameObject(this.m_pkNameSprite); if (this.m_pkNameSprite == null) { this.m_pkNameSprite = CResources.ADDPrefabLoad(this.m_pkHeadUpRoot, NrTSingleton <UIDataManager> .Instance.FilePath + "Prefabs/CharName"); } CharNameBillboardSprite component = this.m_pkNameSprite.GetComponent <CharNameBillboardSprite>(); if (component == null) { return(null); } component.Init(); return(component); }
public void MakeCharGuild(eCharKindType chartype, long i64GuildID, string strGuildName, bool bGuildWar, bool ridestate) { if (this.m_pkHeadUpRoot == null) { return; } this.DisposeGameObject(this.m_pkGuildSprite); if (this.m_pkGuildSprite == null) { this.m_pkGuildSprite = CResources.ADDPrefabLoad(this.m_pkHeadUpRoot, NrTSingleton <UIDataManager> .Instance.FilePath + "Prefabs/CharName"); if (this.m_pkGuildSprite != null) { CharNameBillboardSprite component = this.m_pkGuildSprite.GetComponent <CharNameBillboardSprite>(); if (component == null) { TsLog.LogWarning("!!!!!!!!!!!!!!!!!!!!! m_pkGuildSprite NULL ", new object[0]); return; } component.Init(); if (strGuildName.Length != 0) { string str = string.Empty; if (bGuildWar) { str = NrTSingleton <CTextParser> .Instance.GetTextColor("1401"); } else { str = NrTSingleton <CTextParser> .Instance.GetTextColor("2005"); } component.SetText(str + strGuildName); component.SetTextSize(12f); this.MakeCharGuildRank(component); if (i64GuildID != 0L) { string guildPortraitURL = NrTSingleton <NkCharManager> .Instance.GetGuildPortraitURL(i64GuildID); WebFileCache.RequestImageWebFile(guildPortraitURL, new WebFileCache.ReqTextureCallback(this.ReqWebImageCallback), component); } else { Transform transform = component.transform.FindChild("CharRank"); if (transform != null) { DrawTexture drawTexture = (DrawTexture)transform.GetComponent(typeof(DrawTexture)); drawTexture.SetTexture(NrTSingleton <NewGuildManager> .Instance.GetGuildDefualtTexture()); component.ShowTextAndPlane(true, false, true); } else { component.ShowTextAndPlane(true, false, false); } } this.m_kTempVector3.x = 0f; this.m_kTempVector3.y = 2f; this.m_kTempVector3.z = 0f; this.m_pkGuildSprite.transform.localPosition = this.m_kTempVector3; } this.SyncBillboardRotate(true); bool showHeadUp = this.IsCheckShowHeadUp(chartype); this.SetShowHeadUp(showHeadUp); } } }