Esempio n. 1
0
        public Enemy(IContext context, ScannedRobotEvent evnt)
        {
            _context = context;
            var name = evnt.Name;

            VirtualBullets         = new VirtualBullets();
            GuessFactorStats       = new GuessFactorStatistics();
            Waves                  = new WaveCollection();
            Blips                  = new Blips();
            _enemyGuessFactorStats = new EnemyGuessFactorStatistics();

            Predictions = new PredictionCollection();
            MyBullets   = new BulletCollection(name);
            OnScannedRobot(context, evnt);
        }
Esempio n. 2
0
        public void Render(IGraphics graphics)
        {
            if (Blips != null)
            {
                Blips.Render(graphics);
            }

            if (VirtualBullets != null)
            {
                VirtualBullets.Render(graphics);
            }
            if (Waves != null)
            {
                Waves.Render(graphics);
            }

            if (GuessFactorStats != null)
            {
                GuessFactorStats.Render(graphics);
            }
            if (_enemyGuessFactorStats != null)
            {
                _enemyGuessFactorStats.Render(graphics);
            }
            if (Predictions != null)
            {
                Predictions.Render(graphics);
            }

            //if (Location != null && LateralVelocity != null)
            //{
            //    graphics.DrawPolygon(Pens.Yellow,
            //        new PointF[]
            //        {
            //            Location.ToPointF(),
            //            (Location + 20d * LateralVelocity).ToPointF()
            //        });
            //}
            //if (Location != null && RadialVelocity != null)
            //{
            //    graphics.DrawPolygon(Pens.Yellow,
            //        new PointF[]
            //        {
            //            Location.ToPointF(),
            //            (Location + 20d * RadialVelocity).ToPointF()
            //        });
            //}

            //if (Location != null && LateralAceleration != null)
            //    //{
            //    graphics.DrawPolygon(Pens.Orange,
            //        new PointF[]
            //        {
            //            Location.ToPointF(),
            //            (Location + 100d * LateralAceleration).ToPointF()
            //        });

            //if (Location != null && RadialAceleration != null)
            //{
            //    graphics.DrawPolygon(Pens.Orange,
            //        new PointF[]
            //        {
            //            Location.ToPointF(),
            //            (Location + 100d * RadialAceleration).ToPointF()
            //        });
            //}
        }