void OnTriggerEnter2D(Collider2D other) { CharacterController player = other.GetComponent <CharacterController>(); if (player != null) { player.ChangeHealth(1); Destroy(gameObject); } }