public Section(ISection sec, CNS cns) { myCns = cns; mySec = sec; //получить эффекторы int effCount = sec.GetEffectorsCount(); effsMem = new List<double>[effCount]; for (int effInd = 0; effInd < effCount; ++effInd) { effsMem[effInd] = new List<double>(); Effector eff = new Effector(effInd, this); effs.Add(eff); } //получить сенсоры int sensCount = sec.GetSensorsCount(); sensorsMem = new List<double>[sensCount]; for (int sensInd = 0; sensInd < sensCount; ++sensInd) { sensorsMem[sensInd] = new List<double>(); Sensor sens = new Sensor(sensInd, this, false); sensors.Add(sens); } //получить целевые сенсоры int tSensCount = sec.GetGoalSensorsCount(); tSensorsMem = new List<double>[tSensCount]; for (int tSensInd = 0; tSensInd < tSensCount; ++tSensInd) { tSensorsMem[tSensInd] = new List<double>(); Sensor tSens = new Sensor(tSensInd, this, true); tSensors.Add(tSens); } }