Ejemplo n.º 1
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        MainCharacter mainCh = collision.collider.GetComponent <MainCharacter>();

        if (mainCh != null)
        {
            mainCh.Damage();
        }
    }