Ejemplo n.º 1
0
 public Team(Game c,gameClient g)
 {
     // Network Version Of Team
     r = new Random(seed);
     seed = Convert.ToInt32(System.DateTime.Now.Millisecond);
     creator = c;
     myClient = g;
     teamName = myClient.name;
     tanks[0] = new Tank(creator,this,"tank1",r.Next(800),r.Next(200));//these should have random X,Y s
     tanks[1] = new Tank(creator,this,"tank2",r.Next(800),r.Next(200));
     tanks[2] = new Tank(creator,this,"tank3",r.Next(800),r.Next(200));
     tanks[3] = new Tank(creator,this,"tank4",r.Next(800),r.Next(200));
 }
Ejemplo n.º 2
0
 private void lstTeams_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     /*
      * If you click on lstTeams the team you click on will be added to myclients
      */
      if(mySocket[this.lstTeams.SelectedIndex] != null)
     {
         myClients[currentClient] = new gameClient(this.mySocket[this.lstTeams.SelectedIndex],"test");
         updateCurrentTeams();
     }
     nextClient();
 }
Ejemplo n.º 3
0
 private void lstLocalTeams_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if(this.lstLocalTeams.SelectedItem != null && currentClient<4)
     {
         myClients[currentClient] = new gameClient(lstLocalTeams.SelectedItem.ToString());
         //MessageBox.Show(lstLocalTeams.SelectedItem.ToString());
         updateCurrentTeams();
         nextClient();
     }
 }