Ejemplo n.º 1
0
 public override void OnBulletMissed(BulletMissedEvent e)
 {
     //    ITargetPredictor predictor = this.BulletStrategies[evnt.Bullet];
     //    PredictorStats local1 = this.Predictors[predictor];
     //    local1.Misses++;
     base.OnBulletMissed(e);
 }
Ejemplo n.º 2
0
        public override void OnBulletMissed(BulletMissedEvent evnt)
        {
            var bullets = blackboard.GetValue <List <Bullet> >(BB.bulletsKey);

            bullets.Remove(evnt.Bullet);
            blackboard.SetValue(BB.bulletsKey, bullets);
        }
Ejemplo n.º 3
0
 public override void OnBulletMissed(BulletMissedEvent evnt)
 {
     for (int i = 0; i < behaviors.Count; ++i)
     {
         var behavior = behaviors[i];
         behavior.OnBulletMissed(evnt);
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// nietrafiony pocisk
 /// </summary>
 /// <param name="evnt"></param>
 public override void OnBulletMissed(BulletMissedEvent e)
 {
     //double gunFactor = e.Bullet.Heading - GunHeading;
     //if (e.Bullet.Heading == GunHeading)
     //{
     _IS_TARGET = false;
     //    Scan();
     //}
 }
Ejemplo n.º 5
0
        private void ProcessEvents()
        {
            m_bMoveComplete = false;
            m_bTurnComplete = false;
            if (m_pEvents.Count > 0)
            {
                if (m_pEvents[0] is HitWallEvent)
                {
                    HitWallEvent pEvent = (HitWallEvent)m_pEvents[0];
                    m_pEvents.Clear();
                    OnHitWall(pEvent);
                    m_bMoveComplete = true;
                    return;
                }

                if (m_pEvents[0] is HitRobotEvent)
                {
                    HitRobotEvent pEvent = (HitRobotEvent)m_pEvents[0];
                    m_pEvents.Clear();
                    OnHitRobot(pEvent);
                    m_bMoveComplete = true;
                    return;
                }

                if (m_pEvents[0] is ScannedRobotEvent)
                {
                    ScannedRobotEvent pEvent = (ScannedRobotEvent)m_pEvents[0];
                    m_pEvents.Clear();
                    OnScannedRobot(pEvent);
                    return;
                }

                if (m_pEvents[0] is BulletMissedEvent)
                {
                    BulletMissedEvent pEvent = (BulletMissedEvent)m_pEvents[0];
                    m_pEvents.Clear();
                    OnBulletMissed(pEvent);
                    return;
                }

                if (m_pEvents[0] is BulletHitEvent)
                {
                    BulletHitEvent pEvent = (BulletHitEvent)m_pEvents[0];
                    m_pEvents.Clear();
                    OnBulletHit(pEvent);
                    return;
                }

                if (m_pEvents[0] is HitByBulletEvent)
                {
                    HitByBulletEvent pEvent = (HitByBulletEvent)m_pEvents[0];
                    m_pEvents.Clear();
                    OnHitByBullet(pEvent);
                    return;
                }
            }
        }
Ejemplo n.º 6
0
        public override void OnBulletMissed(BulletMissedEvent e)
        {
            if (Perdido > 2)
            {
                Perdido = 0;
                MudarPosicao();
            }

            Perdido++;
        }
Ejemplo n.º 7
0
        public override void OnBulletMissed(BulletMissedEvent evnt)
        {
            BalaPerdida++;
            BalaCerta = 0;

            if (BalaPerdida > 1)
            {
                BalaPerdida = 0;
                MudarPosicao();
            }
        }
Ejemplo n.º 8
0
        } //onhitbybullet

        public override void OnBulletMissed(BulletMissedEvent e)
        {
            armaDisparo += 1;
            if (tipoTiro == 1)
            {
                armaFrenteDisparo += 1;
            }
            else if (tipoTiro == 2)
            {
                armaDiretoDisparo += 1;
            }
        } // onbulletmiss
Ejemplo n.º 9
0
        public override void OnBulletMissed(BulletMissedEvent evnt)
        {
            base.OnBulletMissed(evnt);
            bulletMissedMax++;
            bulletsMissed++;
            if (bulletsMissed > 2)
            {
                this.blackBoard.CurrentEnemy = null;
                //this.SetTurnRadarRightRadians(360);
                bulletsMissed = 0;
            }

            if (bulletMissedMax > 5)
            {
                currentBehaviour = pushBehaviour;
            }
        }
Ejemplo n.º 10
0
        public override void OnBulletMissed(BulletMissedEvent evnt)
        {
            var bullet = Utilities.FindBulletInfoInBulletList(_bulletsFired, evnt.Bullet);

            if (bullet == null)
            {
                return;
            }

            var state = (int)Math.Round(Utilities.MapToNewScale(bullet.GuessFactor, -1.0d, 1.0d, 0d,
                                                                _aimLearner.NrStates - 1));

            _aimLearner.DecreaseRatio(bullet.ApplicableSegments, state);

            _nrbulletsFired++;

            _bulletsFired.Remove(bullet);
        }
Ejemplo n.º 11
0
 protected virtual void OnBulletMissed(BulletMissedEvent e)
 {
 }
Ejemplo n.º 12
0
 public void OnBulletMissed(BulletMissedEvent evnt)
 {
     count(evnt);
 }
Ejemplo n.º 13
0
 public override void OnBulletMissed(BulletMissedEvent evnt)
 {
     base.OnBulletMissed(evnt);
 }
Ejemplo n.º 14
0
 public virtual void OnBulletMissed(BulletMissedEvent evnt)
 {
 }
Ejemplo n.º 15
0
 public override void OnBulletMissed(BulletMissedEvent evnt)
 {
     base.OnBulletMissed(evnt);
     this.hitCount = 0;
 }
Ejemplo n.º 16
0
 public override void OnBulletMissed(BulletMissedEvent evnt)
 {
     battleEvents.BulletMissedEvents.Add(evnt);
     base.OnBulletMissed(evnt);
 }
Ejemplo n.º 17
0
 public override void OnBulletMissed(BulletMissedEvent evnt)
 {
     blackBoard.CurentBehaviourInfo.consecutiveMisses++;
     blackBoard.totalAmountMissedBullets++;
 }