Esempio n. 1
0
 public Bug()
 {
     InitializeComponent();
       s0lu = new s0("lu");
       s1ru = new s0("ru");
       s2rd = new s1("rd");
       s3ld = new s2("ld");
       s2rd.SetTwin(s3ld.mySection);
       s3ld.SetTwin(s2rd.mySection);
       s4S0 = new sS0("ad");
       s5S1 = new sS1("G");
       myState = CreatureState.JUST_ADDED_OR_MOVED;
       myCNS = new CNS(this);
 }
Esempio n. 2
0
        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);
              }
        }
Esempio n. 3
0
 public Caple()
 {
     leg = new CapleLeg();
       MyCNS = new CNS(this);
       InitializeComponent();
 }