Example #1
0
 public PlayerBulletBl(PlayerBulletModel p, int d)
 {
     base.shape = p;
     this.Damage = d;
 }
Example #2
0
        public List<PlayerBulletBl> Shoot(double ms)
        {
            List<PlayerBulletBl> returnlist=null;
            PlayerBulletModel bullet = null;
            PlayerBulletBl bulletbl = null;
            if(shoot && (ms - lastshoot >= shootinterval))
            {
                returnlist = new List<PlayerBulletBl>();
                lastshoot = ms;
                int num = secondweapon ? 2 : 1;
                for (int i = 0; i < num; i++)
                {
                    bullet = new PlayerBulletModel((int)shape.Area.Left+((int)shape.Area.Width*i), (int)shape.Area.Top, 5, 8);
                    bulletbl = new PlayerBulletBl(bullet, Damage);
                    bulletbl.EnemyShot += (s, e) => this.Points += e;
                    returnlist.Add(bulletbl);
                }
            }

            return returnlist;
        }