using CSVReader; using System.Collections.Generic; using UnityEngine; public class MapSensor : IMapSensor { public override void SetSensorList(Dictionary sensors) { SensorList = sensors; } public override List MapToWorldPositions(List inputs) { if (inputs.Count == 0) { Debug.LogError("Input to Map was of Length 0!"); return inputs; } inputs.ForEach(x => { if (!SensorList.ContainsKey(x.SensorID)) { Debug.LogError("SensorID not Found!"); return; } x.Pos = SensorList[x.SensorID].transform.TransformPoint(x.Pos); x.Rot = SensorList[x.SensorID].transform.TransformDirection(x.Rot); }); return inputs; } }