Ejemplo n.º 1
0
    void Attack()
    {
        // Reset le timer.
        timer = 0f;

        //La cible prend des dommage
        if (targetHealth.currentHealth > 0)
        {
            targetHealth.TakeDamage(attackDamage);
        }
    }
Ejemplo n.º 2
0
    void Attack()
    {
        // Reset the timer.
        timer = 0f;

        // If the player has health to lose...
        if (playerHealth.currentHealth > 0)
        {
            // ... damage the player.
            playerHealth.TakeDamage(attackDamage);
        }
    }