示例#1
0
 void ResetEnviroment()
 {
     if (road != null && !road.Equals(default(RoadObject)))
     {
         road.DestroyGameObject();
     }
     InitializeEnviroment();
     ClearAgentAccident();
     RegisterAccidents();
 }
示例#2
0
    // Update is called once per frame
    void Update()
    {
        if (count % 200 == 0)
        {
            Debug.Log("Tester update counter: " + count);
        }
        if (count <= 0)
        {
            if (road != null && !road.Equals(default(RoadObject)))
            {
                road.DestroyGameObject();
            }
            //road = new RoadObject(GetRandomAnchors(8.0f, 10), true, PathSpace.xz, BezierPath.ControlMode.Automatic, 1.0f);
        }

        count = (count + 1) % max_count;
    }