Example #1
0
 public void AddBullet(Bullet bullet)
 {
     this.bulletsOnScreen.Add(bullet);
 }
Example #2
0
 public void Shoot(int X,int Y)
 {
     if (bulletDelay >= 0)
     {
         bulletDelay--;
     }
     if (bulletDelay <= 0)
     {
         var newBullet = new Bullet(bulletTexture);
         newBullet.position=new Vector2(250-X,250-Y);
         newBullet.isVisible = true;
         bulletAvailable = false;
         if (bullets.Count<1)
         {
             bullets.Add(newBullet);
         }
     }
     if (bulletDelay==0)
     {
         bulletDelay = 1;
     }
 }