| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | public class DebugHeroPosition : 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.Root != null) |
| | | { |
| | | var position = PlayerDatas.Instance.hero.Root.position; |
| | | m_Content.text = StringUtility.Contact("S Pos:", new Vector2(position.x * 2f + GA_Hero.MapOffset.x, position.z * 2f + GA_Hero.MapOffset.z)); |
| | | } |
| | | else |
| | | { |
| | | m_Content.text = ""; |
| | | } |
| | | } |
| | | public class DebugHeroPosition : 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.Root != null)
|
| | | {
|
| | | var position = PlayerDatas.Instance.hero.Root.position;
|
| | | m_Content.text = StringUtility.Contact("S Pos:", new Vector2(position.x * 2f + GA_Hero.MapOffset.x, position.z * 2f + GA_Hero.MapOffset.z));
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Content.text = "";
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | } |