private void OnCollisionEnter(Collision collision) { _audio.clip = ImpactThud; _audio.Play(); //Tally collison - first collision is the player contacting the starting podium, 2nd collsion is the impact after firing. collisions++; //activate playmode on first collsion. if (collisions == 1) { GameDataModel.PlayMode = true; } //Check which turn the player is on after th second collsion. if (collisions == 2) { //iIf the turn is greater or equal to 2 the player has had 3 turns and it is he end of the round. if (GameDataModel.Attempts <= 1) { //disable the player bing able to fire and crepeatedly invoke the end checker every second. _canFire = false; GameDataModel.Attempts = 0; _GM.InvokeRepeating("CheckForEnd", 3.0f, 1.0f); } else { //increment the turn and reset the player. GameDataModel.Attempts -= 1; Invoke("ResetPlayer", 2); } } }