少年修仙传客户端代码仓库
client_linchunjie
2018-09-14 a0ede150686a218c92b901b1f20aef12a9913890
Utility/DebugHeroPosition.cs
@@ -3,27 +3,27 @@
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 = "";
            }
        }
    }
}