public SimpleSensor(SensorConfiguration s) { Debug.Log("configuration " + s); sensorName = s.configurationName; properties = new List <string>(); mappingManager = MappingManager.getInstance(); ReflectionExecutor re = ScriptableObject.CreateInstance <ReflectionExecutor>(); gO = re.GetGameObjectWithName(s.gOName); Debug.Log("game object is " + gO); gOName = s.gOName; cleanDataStructures(); properties.AddRange(s.properties.Distinct()); foreach (StringIntPair p in s.operationPerProperty) { operationPerProperty.Add(p.Key, p.Value); //Debug.Log(p.Key + " " + p.Value); if (p.Value == Operation.SPECIFIC) { foreach (StringStringPair pair2 in s.specificValuePerProperty) { //Debug.Log(pair2.Key + " " + pair2.Value); if (pair2.Key.Equals(p.Key)) { specificValuePerProperty.Add(p.Key, pair2.Value); break; } } } } //UpdateProperties(); }
public SimpleActuator(ActuatorConfiguration s) { actuatorName = s.configurationName; properties = new List <string>(); gO = ReflectionExecutor.GetGameObjectWithName(s.gOName); // MyDebugger.MyDebug(s.gOName); // MyDebugger.MyDebug(gO); gOName = s.gOName; cleanDataStructures(); foreach (string st in s.properties) { if (!properties.Contains(st)) { properties.Add(st); } } populateDataStructures(); }
public SimpleActuator(ActuatorConfiguration s) { actuatorName = s.configurationName; properties = new List <string>(); ReflectionExecutor re = ScriptableObject.CreateInstance <ReflectionExecutor>(); gO = re.GetGameObjectWithName(s.gOName); // Debug.Log(s.gOName); // Debug.Log(gO); gOName = s.gOName; cleanDataStructures(); foreach (string st in s.properties) { if (!properties.Contains(st)) { properties.Add(st); } } populateDataStructures(); }
public GameObject GetGameObject(string chosenGO) { return(re.GetGameObjectWithName(chosenGO)); }
public GameObject GetGameObject(string chosenGO) { return(ReflectionExecutor.GetGameObjectWithName(chosenGO)); }