| | |
| | | {
|
| | | m_PlayerName.text = _name;
|
| | | m_HangHint.gameObject.SetActive(_hang);
|
| | | SetRealm(_realm);
|
| | | SetPlayerRealm(_realm);
|
| | | SetTitle(_titleId);
|
| | | SetAlliance(_alliance);
|
| | | SyncPosition(true);
|
| | | }
|
| | |
|
| | | public void SetRealm(int _realm)
|
| | | public void SetPlayerRealm(int _realm)
|
| | | {
|
| | | m_Realm.gameObject.SetActive(_realm > 0);
|
| | | m_PlayerName.alignment = _realm > 0 ? TextAnchor.MiddleLeft : TextAnchor.MiddleCenter;
|
| | |
|
| | | if (_realm > 0)
|
| | | if (m_Realm)
|
| | | {
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
|
| | | if (realmConfig != null)
|
| | | if (_realm > 0)
|
| | | {
|
| | | m_Realm.gameObject.SetActive(true);
|
| | | m_PlayerName.alignment = TextAnchor.MiddleLeft;
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
|
| | | m_Realm.SetSprite(realmConfig.Img);
|
| | | SetImageMaterialTexture(realmConfig.Img);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Realm.gameObject.SetActive(false);
|
| | | m_PlayerName.alignment = TextAnchor.MiddleCenter;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public void SetFunctionalNpcRealm(int _realm)
|
| | | public void SetNpcRealm(int _realm)
|
| | | {
|
| | | m_Realm.gameObject.SetActive(true);
|
| | | m_PlayerName.alignment = TextAnchor.MiddleLeft;
|
| | |
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
|
| | | if (realmConfig != null)
|
| | | if (m_Realm != null)
|
| | | {
|
| | | m_Realm.SetSprite(realmConfig.Img);
|
| | | SetImageMaterialTexture(realmConfig.Img);
|
| | | if (ConfigManager.Instance.ContainKey<RealmConfig>(_realm))
|
| | | {
|
| | | m_Realm.gameObject.SetActive(true);
|
| | | m_PlayerName.alignment = TextAnchor.MiddleLeft;
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
|
| | | m_Realm.SetSprite(realmConfig.Img);
|
| | | SetImageMaterialTexture(realmConfig.Img);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_PlayerName.alignment = TextAnchor.MiddleCenter;
|
| | | m_Realm.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | public void SetNPCName(string _name)
|
| | | {
|
| | | SetFunctionalNpcRealm(0);
|
| | | SetNpcRealm(999);
|
| | | m_PlayerName.text = _name;
|
| | | SyncPosition(true);
|
| | | }
|
| | |
| | | var config = ConfigManager.Instance.GetTemplate<NPCConfig>(_id);
|
| | | if (config != null)
|
| | | {
|
| | | SetFunctionalNpcRealm(config.Realm);
|
| | | SetNpcRealm(config.ClientRealm);
|
| | | m_PlayerName.text = config.charName;
|
| | | }
|
| | |
|
| | |
| | | findPreciousModel.bossInfoUpdateEvent -= UpdateNpcRebornTime;
|
| | | findPreciousModel.bossInfoUpdateEvent += UpdateNpcRebornTime;
|
| | | npcId = _npcId;
|
| | |
|
| | | var config = ConfigManager.Instance.GetTemplate<NPCConfig>(_npcId);
|
| | | if (config != null)
|
| | | {
|
| | | SetRealm(config.Realm);
|
| | | SetNpcRealm(config.ClientRealm);
|
| | | m_PlayerName.text = config.charName;
|
| | | }
|
| | |
|
| | |
| | | var config = ConfigManager.Instance.GetTemplate<NPCConfig>(_npcId);
|
| | | if (config != null)
|
| | | {
|
| | | SetRealm(config.Realm);
|
| | | SetNpcRealm(config.ClientRealm);
|
| | | m_PlayerName.text = StringUtility.Contact(config.charName, Language.Get("HeadUpName_Monster", _level));
|
| | | monsterLevel = _level;
|
| | | monsterType = (E_MonsterType)config.IsBoss;
|