Exemplo n.º 1
0
    public void damage(float time)
    {
        //rb.AddForce((-transform.right + transform.up)*8,ForceMode.Impulse);
        if (m_bInvincible)
        {
            return;
        }

        hori = 0;
        m_iDamage++;
        m_bInvincible = true;
        soundManager.GetComponent <SoundManager>().damageSE();       //damage
        Invoke("InvincibleEnd", time);
        HP.Off(m_iDamage - 1);
    }