using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class DebugHeroTarget : MonoBehaviour { [SerializeField] Text m_Content; float timer = 0.5f; private void LateUpdate() { timer += Time.deltaTime; if (timer > 0.5f) { timer = 0f; if (PlayerDatas.Instance.hero != null && PlayerDatas.Instance.hero.SelectTarget != null) { var target = PlayerDatas.Instance.hero.SelectTarget; int _npcID = 0; if (target is GActorNpcFight) { _npcID = (target as GActorNpcFight).NpcConfig.NPCID; } else if (target is GActorNpcNoFight) { _npcID = (target as GActorNpcNoFight).NpcConfig.NPCID; } uint _sid = target.ServerInstID; if (PersonalEnemy.m_CBinSdDict.ContainsKey(_sid)) { _sid = PersonalEnemy.m_CBinSdDict[_sid]; } m_Content.text = StringUtility.Contact("O:", _sid, "---", "N:", _npcID); } else { m_Content.text = ""; } } } }