Exemplo n.º 1
0
    void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.gameObject.tag == "Player")
        {
            HealthScriptForPlayer4 _health7 = collision.gameObject.GetComponent <HealthScriptForPlayer4>();

            _health7.TakeDamgeee(damageamount);
        }
    }
Exemplo n.º 2
0
    void OnCollisionEnter2D(Collision2D collision)
    {
        //if (collision.gameObject.tag == "Enemy" || collision.gameObject.tag == "Player")
        if (collision.gameObject.tag == "Player")
        {
            HealthScriptForPlayer4 _health4 = collision.gameObject.GetComponent <HealthScriptForPlayer4>();

            _health4.TakeDamgeee(damageamount);
        }
    }