void StartAgain()
{
isFinished = false;
audioSource.volume = 0f;
Debug.Log ("Started again");
//Reset car position
transform.position = initialPosition;
transform.rotation = initialRotation;
finishText.text = "";
begunAccelerating = false;
isAccelerating = 0;
if (crashed) {
Debug.Log("We had crashed");
sensors.ClearList();
}
if (shouldSendData) {
Debug.Log ("Sending data..");
sendData.SendDataToServer ();
sensors.ClearList ();
shouldSendData = false;
Debug.Log("Quit");
Application.LoadLevel("Start");
}
else if (MoveCar.isControlledByAI) {
//Debug.Log ("started coroutine for getting data");
StartCoroutine (sendData.GetDataFromServer ());
}
}