Hit detection and enemy spawning.