示例#1
0
    //Execute the player attack. Recieves a float (Distance the player is from the target) to compare with the attack Range before executing the attack
    public void Attack(GameObject target)
    {
        EnemyHealth eh = target.GetComponent <EnemyHealth>();

        eh.AdjustCurrHealth(-playerAttackDamage);

        Debug.Log(eh.CurrHealth);
    }