Example #1
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     if(chk)
     {
         Random rnd = new Random();
         int n = rnd.Next(1, 8);
         Player p = new Player(n);
         character.Image = Image.FromFile(p.RrunPath);
         character.Location = new Point(-100, 433);
         chk = false;
     }
     else if(character.Left>1200)
     {
         chk = true;
     }
     else
     {
         Random rnd = new Random();
         int n = rnd.Next(2, 6);
         character.Left += n;
     }
 }
Example #2
0
 //Open Up SelectScreen
 private void SelectScreen_Load(object sender, EventArgs e)
 {
     //BackgroundSFX
     Random rnd = new Random();
     int num = rnd.Next(1, 6);
     bgSound.URL = @"SFX\background\bit" + Convert.ToString(num) + ".wav";
     /*Random rnd = new Random();
     int num = rnd.Next(1, 4);
     bgSound.URL = @"SFX\select\sl" + Convert.ToString(num) + ".mp3";*/
     bgSound.settings.setMode("loop", true);
     //bgSound.settings.volume = 20;
     bgSound.Ctlcontrols.play();
     //Setup Background
     wallpaper.Image = Image.FromFile("Wallpaper/wallpaper.gif");
     //List Player
     p[0] = new Player(1);
     p[1] = new Player(2);
     p[2] = new Player(3);
     p[3] = new Player(4);
     p[4] = new Player(5);
     p[5] = new Player(6);
     p[6] = new Player(7);
 }
Example #3
0
 //GamoModel Constructor
 public GameModel(int Select1, int Select2, int SelectWallpaper)
 {
     p1 = new Player(100, 535, Select1);
     p2 = new Player(1000, 535, Select2);
     Wall = SelectWallpaper;
 }
Example #4
0
 public EndScreen(int pin)
 {
     InitializeComponent();
     pwinner = new Player(pin);
 }