Пример #1
0
 public override void InitializeSprite()
 {
     if (size.Height > 100)
     {
         Sprite = new PictureBox
         {
             Size      = size,
             BackColor = Color.Transparent,
             Image     = Properties.Resources.asteroid3,
             SizeMode  = PictureBoxSizeMode.StretchImage
         };
     }
     else if (size.Height > 80 && size.Height <= 100)
     {
         Sprite = new PictureBox
         {
             Size      = size,
             BackColor = Color.Transparent,
             Image     = Properties.Resources.asteroid2,
             SizeMode  = PictureBoxSizeMode.StretchImage
         };
     }
     else
     {
         Sprite = new PictureBox
         {
             Size      = size,
             BackColor = Color.Transparent,
             Image     = Properties.Resources.asteroid,
             SizeMode  = PictureBoxSizeMode.StretchImage
         };
     }
     Sprite.BringToFront();
 }