Example #1
0
 public void AddBullet(Bullet bullet)
 {
     bullets.Add(bullet);
 }
Example #2
0
 private void SpawnBullet(int x, int y, float angle, float speed, bool playerIsOwner)
 {
     Bullet bullet = new Bullet(sprite, playerIsOwner);
     bullet.position = new PointF(x - bullet.sprite.imageRec.Width / 2, y - bullet.sprite.imageRec.Height / 2);
     bullet.angle = angle;
     bullet.speed = speed;
     game.level.AddBullet(bullet);
 }