Rolling Ball Game - How do I set it so the Player only wins, if they reach the finish line, with a certain number in Count?,

Hiya, right so I’m working off the Rolling Ball Game tutorial on Unity (It is Unity 5). But I’m building up from it. My game has become more of platforming type rolling ball game. I’ve got pretty far by looking up what I need. But this one last thing I need to do is seemingly too particular to me, to find any information on, anywhere else.


So to put it simply, in my game the Player must get to the end of level, but on the way they must collect all the PickUps, or they lose.


I’ve got everything sorted, jumping, respawning, moving obstacles, rotating platforms, etc, along with everything else the tutorial taught me.


But what I cant seem to work out is how to set a condition where, if the Player reaches the “Finish Point” (AKA; Hits a Box Collider with a Trigger set to it. I’d assume), if the Count (That’s the count for the PickUps in the UI) equals less than 14 they lose, but it equals 14 or more they win.


I know, its extremely simple I’m sure. But scripting alludes me. If I see a script and its explained to me step by step, I just barley understand what it does. Barley.


Please if anyone can show me a script, or even just link me to a tutorial on this I’d truly appreciate it. I’ve been working at this for weeks now, pretty much on my own. This really is the last thing I need to get this working. I just want this level to work fully.


Thank you for reading, I hope you can help me.
,

Ok so I’ve tried to add some scripting to the Player Controller:

public float speed;
public Text countText;
public Text winText;
public Text loseText;
public AudioClip Collection;

private AudioSource source;
private Rigidbody rb;
private int count;

void Start ()
{
	source = GetComponent<AudioSource>();
	rb = GetComponent<Rigidbody>();
	count = 0;
	SetCountText ();
	winText.text = "";
}

void FixedUpdate ()
{
	float moveHorizontal = Input.GetAxis ("Horizontal");
	float moveVertical = Input.GetAxis ("Vertical");

	Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);

	rb.AddForce (movement * speed);
}

void OnTriggerEnter(Collider other) 
{
	if (other.gameObject.CompareTag ( "Pick Up"))
	{
		other.gameObject.SetActive (false);
		count = count + 1;
		SetCountText ();
		source.PlayOneShot (Collection, 1F);
	
	}
}

void OnTriggerEnter(Collider other)
{
	if (other.gameObject.CompareTag ("TheEnd")) {
		if (count <= 0) {
			loseText.text = "You Lose!";
		}
	}
}

void SetCountText ()
{
	countText.text = "Count: " + count.ToString ();
	if (count >= 20)
	{
		winText.text = "You Win!";
	}
}

But Of course it doesn’t work, because you can’t have two “void OnTriggerEnter(Collider other)”. However when I tried to add another If statement to the first "void OnTriggerEnter(Collider other), that didn’t work either.


Is there anyway to have like an Else or Elif type thing? If that makes any sense. Yeah scripting really isn’t my area, sorry.