Ejemplo n.º 1
0
    void attack(GameObject target)
    {
        //play animation
        attack();
        //get targets health and do damage
        health currentTargetHealth = target.GetComponent <health>();

        currentTargetHealth.doDamage(damage);
    }