Exemplo n.º 1
0
        public Enemy(Vector2 pos, Vector2 corner, Player target)
            : base(pos, shapePoints, Pens.Red, corner)
        {
            this.target = target;
            random      = new Random();
            aim         = new Vector2();
            //velocity = new Vector2(random.Next(-10, 10), random.Next(-10, 10));
            Vector2 direction = location - target.getLocation();

            velocity = direction;
            velocity = velocity.normalize();
            velocity = MAX_SPEED * velocity;
            bullets  = new BulletContainer();
        }
Exemplo n.º 2
0
 public void AddBullets(BulletContainer bullet)
 {
     bullets.Add(bullet);
 }