示例#1
0
    public override void Attack()
    {
        Lifevessel lifevessel = target.GetComponent <Lifevessel>();

        if (lifevessel != null)
        {
            lifevessel.TakeDamage(info.CurrentDamage);
        }

        Debug.Log("Enemy Attack");
    }
示例#2
0
 // Start is called before the first frame update
 void Awake()
 {
     myRigidBody = GetComponent <Rigidbody>();
     lifevessel  = GetComponent <Lifevessel>();
     agent       = GetComponent <NavMeshAgent>();
 }