private void Start()
 {
     dialogueManager = GameObject.FindObjectOfType <DialogueManager>();
     animator        = GetComponent <Animator>();
     player          = GameObject.FindGameObjectWithTag("Player").GetComponent <M_PlayerController>();
     camr            = GetComponent <M_Camera>();
 }
    public void OnExitFocus()
    {
        GameCursor.SetCursor(ENUM_CURSOR.NORMAL);
        if (base.gameObject.name == "Player")
        {
            return;
        }
        GameObject gameObject = GameObject.Find("Player");

        if (gameObject)
        {
            M_PlayerController component = gameObject.GetComponent <M_PlayerController>();
            if (component)
            {
                component.m_PickTarget = null;
                this.OnHeadLookAt(gameObject, null);
            }
        }
        GameObject ridePetObj = Swd6Application.instance.m_ExploreSystem.RidePetObj;

        if (ridePetObj != null)
        {
            M_RidePetController component2 = ridePetObj.GetComponent <M_RidePetController>();
            if (component2)
            {
                component2.m_PickTarget = null;
            }
        }
    }
    public void OnMouseEnter()
    {
        if (this.UpdateMouseUIEvent())
        {
            return;
        }
        GameObject gameObject = GameObject.Find("Player");

        if (gameObject)
        {
            M_PlayerController component = gameObject.GetComponent <M_PlayerController>();
            if (component && this.Pick)
            {
                component.m_PickTarget = base.gameObject;
                this.OnHeadLookAt(gameObject, base.gameObject);
            }
        }
        GameObject ridePetObj = Swd6Application.instance.m_ExploreSystem.RidePetObj;

        if (ridePetObj != null)
        {
            M_RidePetController component2 = ridePetObj.GetComponent <M_RidePetController>();
            if (component2)
            {
                component2.m_PickTarget = base.gameObject;
            }
        }
    }
 public void OnMouseDown()
 {
     if (this.UpdateMouseUIEvent())
     {
         return;
     }
     if (Swd6Application.instance.m_ExploreSystem.LockPlayer)
     {
         return;
     }
     if (Input.GetMouseButton(0))
     {
         GameObject ridePetObj = Swd6Application.instance.m_ExploreSystem.RidePetObj;
         if (ridePetObj != null)
         {
             M_RidePetController component = ridePetObj.GetComponent <M_RidePetController>();
             if (component)
             {
                 if (this.Pick)
                 {
                     component.MoveTarget = base.gameObject;
                 }
                 return;
             }
         }
         GameObject gameObject = GameObject.Find("Player");
         if (gameObject)
         {
             M_PlayerController component2 = gameObject.GetComponent <M_PlayerController>();
             if (component2)
             {
                 if (base.gameObject == gameObject)
                 {
                     Debug.Log("OnMouseDown_PlayObj");
                     return;
                 }
                 if (this.Pick)
                 {
                     component2.MoveTarget = base.gameObject;
                 }
             }
         }
     }
 }
    public void OnMouseOver()
    {
        if (this.UpdateMouseUIEvent())
        {
            GameCursor.SetCursor(ENUM_CURSOR.NORMAL);
            return;
        }
        if (base.gameObject.name == "Player")
        {
            return;
        }
        if (this.Invalid)
        {
            return;
        }
        if (Swd6Application.instance.m_ExploreSystem.LockPlayer)
        {
            return;
        }
        GameObject gameObject = GameObject.Find("Player");

        if (gameObject)
        {
            M_PlayerController component = gameObject.GetComponent <M_PlayerController>();
            if (component && this.Pick)
            {
                component.m_PickTarget = base.gameObject;
                this.OnHeadLookAt(gameObject, base.gameObject);
                if (this.m_NpcData.emType == ENUM_NpcType.Treasure && this.HideRole && this.m_NpcData.Show == 0 && this.m_NpcData.emActionHint == ENUM_ActionHint.Null)
                {
                    return;
                }
                if (this.m_NpcData.emType == ENUM_NpcType.Mine)
                {
                    GameCursor.SetCursor(ENUM_CURSOR.GATHER);
                }
                else if (this.m_NpcData.emType == ENUM_NpcType.Treasure || this.m_NpcData.emType == ENUM_NpcType.Egg)
                {
                    GameCursor.SetCursor(ENUM_CURSOR.PICK);
                }
                else if (this.m_NpcData.emType == ENUM_NpcType.Trap)
                {
                    GameCursor.SetCursor(ENUM_CURSOR.SEE);
                }
                else
                {
                    GameCursor.SetCursor(ENUM_CURSOR.TALK);
                }
            }
        }
        GameObject ridePetObj = Swd6Application.instance.m_ExploreSystem.RidePetObj;

        if (ridePetObj != null)
        {
            M_RidePetController component2 = ridePetObj.GetComponent <M_RidePetController>();
            if (component2)
            {
                component2.m_PickTarget = base.gameObject;
                if (this.m_NpcData.emType == ENUM_NpcType.Mine)
                {
                    GameCursor.SetCursor(ENUM_CURSOR.GATHER);
                    return;
                }
                if (this.m_NpcData.emType == ENUM_NpcType.Treasure || this.m_NpcData.emType == ENUM_NpcType.Egg)
                {
                    GameCursor.SetCursor(ENUM_CURSOR.PICK);
                    return;
                }
                if (this.m_NpcData.emType == ENUM_NpcType.Trap)
                {
                    GameCursor.SetCursor(ENUM_CURSOR.SEE);
                    return;
                }
                GameCursor.SetCursor(ENUM_CURSOR.TALK);
            }
        }
    }