コード例 #1
0
ファイル: Enemy.cs プロジェクト: sck4512/Portfolio
 protected virtual void OnTriggerExit(Collider other)
 {
     if (other.tag == "Player")
     {
         otherUnit = null;
     }
 }
コード例 #2
0
ファイル: Enemy.cs プロジェクト: sck4512/Portfolio
    protected virtual void OnTriggerEnter(Collider other)
    {
        if (other.tag == "PlayerArrow")
        {
            chaseTarget = GameManager.Instance.PlayerTransform;
        }


        if (other.tag == "Player")
        {
            //플레이어를 쫓음
            chaseTarget = GameManager.Instance.PlayerTransform;
            //ChaseTarget();
            otherUnit = other.GetComponent <IFightUnit>();
        }
    }