private void SpaceOdyssey_MouseClick(object sender, MouseEventArgs e) { HeroBullet bullet = new HeroBullet(new Point(Game.Hero.Location.X + Game.Hero.HeroShipImg.Width / 2 - 101, Game.Hero.Location.Y)); Game.Hero.AddHeroBullet(bullet); foreach (HeroBullet bullet1 in Game.Hero.bullets) { bullet1.UpdatePosition(); } }
public void AddHeroBullet(HeroBullet bullet) { this.bullets.Add(bullet); }