Exemplo n.º 1
0
    void OnTriggerEnter(Collider other)
    {
        Destroy(gameObject);

        if (other.transform.root.gameObject.CompareTag("Enemy"))
        {
            other.transform.root.gameObject.GetComponent <Health>().Hit(20 + (5 * (x.getclevel() - 1)));
        }
    }