private void LateUpdate() { // Checks after every Update if the player ship hit any asteroid. if (_runGameController.PlayerIntersection(shipSprite) && !isInvincible) { // The ship's hit points are reduced, the health bar is updated and the ship is invincible for a set amount of time. hp--; healthBar.reduce(hp, startHitPoints); StartCoroutine(Invincibility()); } upgradeController.PlayerIntersection(shipSprite); }