Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Cheese"/> class.
 /// </summary>
 /// <param name="location">The location.</param>
 /// <param name="frameW">The frame W.</param>
 /// <param name="frameH">The frame H.</param>
 /// <param name="frameDelay">The frame delay.</param>
 public Cheese(PointF location, int frameW, int frameH, int frameDelay)
 {
     radius = (int)(0.35 * MainForm.LEN);
     pic = new Picture("pics/Cheese-icon.png", location, frameW, frameH, frameDelay);
     width = pic.bitmap.Width;
     height = pic.bitmap.Height;
     this.location = location;
 }
Example #2
0
File: Rat.cs Project: ajrod/Ratatat
 /// <summary>
 /// Initializes a new instance of the <see cref="Rat"/> class.
 /// </summary>
 /// <param name="location">The location.</param>
 /// <param name="frameW">The frame W.</param>
 /// <param name="frameH">The frame H.</param>
 /// <param name="frameDelay">The frame delay.</param>
 public Rat(PointF location, int frameW, int frameH, int frameDelay)
 {
     usedPenalty = 0;
     hitWall = 0;
     if (MainForm.LEN <= 50)
     {
         steps_per_movement = 4;
     }
     else
     {
         steps_per_movement = 8;
     }
     score = 0;
     finished = false;
     steps = 0;
     currentChrom = 0;
     radius = (int)(0.35 * MainForm.LEN);
     pic = new Picture("pics/Rat.gif", location, frameW, frameH, frameDelay);
     width = pic.bitmap.Width;
     height = pic.bitmap.Height;
     this.location = location;
 }