Example #1
0
    private void OnTriggerEnter(Collider other)
    {
        Character2D player = other.GetComponent <Character2D> ();

        if (player != null)
        {
            player.TookDamage(damage);
            Debug.Log("Hit");
        }
    }