Example #1
0
 public override void ElementReset()
 {
     base.ElementReset();
     transform.position   = TestDataManager.ParseV3(obstacleSetting.Pos);
     transform.rotation   = Quaternion.Euler(TestDataManager.ParseV3(obstacleSetting.Rot));
     transform.localScale = TestDataManager.ParseV3(obstacleSetting.Scale);
 }
Example #2
0
 public void SetMapElements()
 {
     if (TestConfig.TestMode.TestCarStart != null)
     {
         ResetCar();
     }
     isRepeat = TestConfig.TestMode.isRepeat;
     if (TestConfig.TestMode.CheckPointSettings != null && TestConfig.TestMode.CheckPointSettings.Count > 0)
     {
         foreach (CheckPointSetting setting in TestConfig.TestMode.CheckPointSettings)
         {
             ElementsManager.Instance.AddCheckPoint(TestConfig.ParseV3(setting.transformData.V3Pos), TestConfig.ParseV3(setting.transformData.V3Rot), TestConfig.ParseV3(setting.transformData.V3Sca), setting.Name).chechPointSetting = setting;
         }
     }
     if (TestConfig.TestMode.ObstacleSettings != null)
     {
         foreach (ObstacleSetting setting in TestConfig.TestMode.ObstacleSettings)
         {
             ElementsManager.Instance.AddObstacle(TestDataManager.ParseV3(setting.Pos), TestDataManager.ParseV3(setting.Rot), TestDataManager.ParseV3(setting.Scale), setting.Name);
         }
     }
     if (TestConfig.TestMode.CarAISettings != null)
     {
         foreach (CarAISetting setting in TestConfig.TestMode.CarAISettings)
         {
             ElementsManager.Instance.AddCarAI(TestDataManager.ParseV3(setting.PosInit), setting.Name).SetCarAISetting(setting);
         }
     }
     if (TestConfig.TestMode.HumanSettings != null)
     {
         foreach (HumanSetting setting in TestConfig.TestMode.HumanSettings)
         {
             ElementsManager.Instance.AddPedestrian(TestDataManager.ParseV3(setting.PosArray[0]), setting.Name).SetHumansetting(setting);
         }
     }
     if (TestConfig.TestMode.TrafficLightSettings != null)
     {
         foreach (TrafficLightSetting setting in TestConfig.TestMode.TrafficLightSettings)
         {
             foreach (ObjTrafficLight item in ElementsManager.Instance.TrafficLightList)
             {
                 if (item.name == setting.Name)
                 {
                     item.SetTrafficLightSetting(setting);
                 }
             }
         }
     }
     if (TestConfig.TestMode.VoyageTestConfig != null)
     {
         VoyageTestManager.Instance.SetVoyageTestConfig(TestConfig.TestMode.VoyageTestConfig);
     }
 }