示例#1
0
 public void Initialize(PositionComputer positionComputer, FiringSolution firingSolution, Led deadLed, GPSIMU forDebugPrintOut)
 {
     this.deadLed                    = deadLed;
     this.forDebugPrintOut           = forDebugPrintOut;
     positionComputer.AttNavCreated += new PositionComputer.AttNavDataReadyDelegate(positionComputer_AttNavCreated);
     firingSolution.DLCCreated      += new FiringSolution.DLCCreatedDelegate(firingSolution_DLCCreated);
 }
        // Initializer, used to give the Radio, PositionComputer, and FiringSolution classes each other's events.
        public void Initialize(PositionComputer positionComputer, Radio xbee, Trigger trigger, Led firingLed, Led statusLed, GPSIMU forDebugPrint, Led gpsLed)
        {
            positionComputer.AttNavCreated += new PositionComputer.AttNavDataReadyDelegate(positionComputer_AttNavCreated);
            xbee.ReceivedAttNavEnemy       += new Radio.AttNavDelegate(xbee_ReceivedAttNavEnemy);
            trigger.sevenTimesKeyed        += new Trigger.sevenTimesKeyedDelegate(trigger_sevenTimesKeyed);
            this.forDebugPrint              = forDebugPrint;
            this.killLed   = firingLed;
            this.statusLed = statusLed;
            this.gpsLed    = gpsLed;
            this.trigger   = trigger;


            enemyLocker = new Object();
            meLocker    = new Object();
        }