Exemplo n.º 1
0
    void OnTriggerEnter2D(Collider2D other)
    {
        CharacterController player = other.GetComponent <CharacterController>();

        if (player != null)
        {
            player.ChangeHealth(1);
            Destroy(gameObject);
        }
    }