示例#1
0
文件: RayZ.cs 项目: choi98-git/SGPS
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.G) && NeedCoin.isQuest == false)
        {
            RaycastHit hitInfo;

            if (Physics.Raycast(this.transform.position, this.transform.forward, out hitInfo, 10f, LayerMask.GetMask("NPC")))
            {
                scanNpc = hitInfo.transform.gameObject;
                cnt++;
                manager.Action(scanNpc);
            }
        }
    }