/// <summary> /// Move camera upwards with player and kills player if it falls out the bottom of the view /// </summary> private void Player() { if (playerMove.transform.position.y > transform.position.y) //if player is higher than current camera position { transform.position = new Vector3(transform.position.x, playerMove.transform.position.y, transform.position.z); //move camera up to the player's position } if (playerMove.transform.position.y < transform.position.y - camSize && Time.timeScale > 0) //if player is below the bottom of the camera { playerMove.GameOver(); //player dies } }