예제 #1
0
 public void AcquireEquipment(IEquipment equipment)
 {
     if (Arsenal.Count < 5)
     {
         Arsenal.Add(equipment);
     }
 }
예제 #2
0
 public ShotGun(Sprite owner, Sprite oppenent, Sprite ball)
 {
     this.Name   = "ShotGun";
     Owner       = owner;
     Oppenent    = oppenent;
     Ball        = ball;
     Size.Width  = 4 * Brick.Width;
     Location.X  = Owner.Location.X + Owner.Size.Width + Brick.Width;
     Location.Y  = Owner.Location.Y + Owner.Size.Height / 2;
     Size.Height = Brick.Height;
     for (int i = 0; i < GameSettings.GetInstance().DefaultAmmo; i++)
     {
         Arsenal.Add(new Bullet(this));
     }
     this.Drawer = new ShotGunDrawer(this);
 }