void Update()
    {
        if (!photonView.isMine)
        {
            SetReceivedValues();
            //stats = GameObject.FindGameObjectWithTag("stats");
            fp   = GameObject.Find("FinalPositions").GetComponent <FinalPositions>();
            area = GameObject.Find("SewerMap").GetComponent <SetRaceTrack>();
            return;
        }

        if (NextCheckpointIndex > 5)
        {
            b1.SetActive(false);
            b2.SetActive(false);
            b3.SetActive(true);
            b4.SetActive(true);
        }

        if (Input.GetKey("r"))
        {
            AgentReset();
        }

        if (pHandler.numPlayers == area.carAgents.Count && onceAgain)
        {
            temp.SetActive(true);
            StartCoroutine(temp.GetComponent <countDown>().StartCountDown(this.gameObject));
            //Debug.Log("afterCountDown");
            //GetComponent<CarController>().ThawAgent();
            onceAgain = false;
        }
    }
    void Start()
    {
        pHandler = GameObject.Find("PhotonStatic").GetComponent <photonHandler>();
        spawnId  = pHandler.spawnId;
        if (spawnId == 1)
        {
            offset = new Vector3(1f, 0f, 1f);
        }
        else if (spawnId == 2)
        {
            offset = new Vector3(5f, 0f, 1f);
        }
        else if (spawnId == 3)
        {
            offset = new Vector3(10f, 0f, 1f);
        }
        else if (spawnId == 4)
        {
            offset = new Vector3(15f, 0f, 1f);
        }

        if (!photonView.isMine)
        {
            return;
        }
        stats = GameObject.FindGameObjectWithTag("stats");
        temp  = GameObject.Find("Canvas");
        temp.SetActive(false);
        if (photonView.isMine)
        {
            stats.SetActive(false);
        }
        fp   = GameObject.Find("FinalPositions").GetComponent <FinalPositions>();
        area = GameObject.Find("SewerMap").GetComponent <SetRaceTrack>();
        AgentReset();
        b1 = GameObject.Find("b3");
        b2 = GameObject.Find("b4");
        b3 = GameObject.Find("b5");
        b4 = GameObject.Find("b6");
        b3.SetActive(false);
        b4.SetActive(false);
    }