This commit is contained in:
Mootfrost777 2022-04-24 10:05:54 +03:00
parent a3705bffc2
commit d0af8bdabc
33 changed files with 26 additions and 23 deletions

Binary file not shown.

View file

@ -44,6 +44,7 @@
this.NameTB.Name = "NameTB"; this.NameTB.Name = "NameTB";
this.NameTB.Size = new System.Drawing.Size(224, 27); this.NameTB.Size = new System.Drawing.Size(224, 27);
this.NameTB.TabIndex = 0; this.NameTB.TabIndex = 0;
this.NameTB.Text = "test";
// //
// IPTB // IPTB
// //
@ -51,6 +52,7 @@
this.IPTB.Name = "IPTB"; this.IPTB.Name = "IPTB";
this.IPTB.Size = new System.Drawing.Size(224, 27); this.IPTB.Size = new System.Drawing.Size(224, 27);
this.IPTB.TabIndex = 1; this.IPTB.TabIndex = 1;
this.IPTB.Text = "127.0.0.1";
// //
// PortTB // PortTB
// //
@ -58,6 +60,7 @@
this.PortTB.Name = "PortTB"; this.PortTB.Name = "PortTB";
this.PortTB.Size = new System.Drawing.Size(224, 27); this.PortTB.Size = new System.Drawing.Size(224, 27);
this.PortTB.TabIndex = 2; this.PortTB.TabIndex = 2;
this.PortTB.Text = "7632";
// //
// label1 // label1
// //

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 B

After

Width:  |  Height:  |  Size: 980 B

View file

@ -1,8 +1,2 @@
Source File,Dest File,Processor Type,Content Type,Source File Size,Dest File Size,Build Seconds Source File,Dest File,Processor Type,Content Type,Source File Size,Dest File Size,Build Seconds
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/arrow.png","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/arrow.xnb","TextureProcessor","Texture2DContent",365,2725,0,1991587 "C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/keggle.png","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/keggle.xnb","TextureProcessor","Texture2DContent",980,6485,0,2016653
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/ball.png","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/ball.xnb","TextureProcessor","Texture2DContent",652,10085,0,0067644
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/gameFont.spritefont","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/gameFont.xnb","FontDescriptionProcessor","SpriteFontContent",2069,70690,0,1546222
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/gameFont2.spritefont","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/gameFont2.xnb","FontDescriptionProcessor","SpriteFontContent",2069,136226,0,0475374
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/keggle.png","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/keggle.xnb","TextureProcessor","Texture2DContent",276,4181,0,0053606
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/line.png","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/line.xnb","TextureProcessor","Texture2DContent",39598,224925,0,0162617
"C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/logo.png","C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/logo.xnb","TextureProcessor","Texture2DContent",28661,504373,0,0282225

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<PipelineBuildEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <PipelineBuildEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SourceFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/keggle.png</SourceFile> <SourceFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/keggle.png</SourceFile>
<SourceTime>2022-04-23T00:12:43.2915834+03:00</SourceTime> <SourceTime>2022-04-23T21:52:30+03:00</SourceTime>
<DestFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/Content/keggle.xnb</DestFile> <DestFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/Content/keggle.xnb</DestFile>
<DestTime>2022-04-23T14:37:54.0070101+03:00</DestTime> <DestTime>2022-04-23T23:52:18.2788162+03:00</DestTime>
<Importer>TextureImporter</Importer> <Importer>TextureImporter</Importer>
<ImporterTime>2020-08-10T16:17:54+03:00</ImporterTime> <ImporterTime>2020-08-10T16:17:54+03:00</ImporterTime>
<Processor>TextureProcessor</Processor> <Processor>TextureProcessor</Processor>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<PipelineBuildEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <PipelineBuildEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SourceFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/keggle.png</SourceFile> <SourceFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/keggle.png</SourceFile>
<SourceTime>2022-04-23T00:12:43.2915834+03:00</SourceTime> <SourceTime>2022-04-23T21:52:30+03:00</SourceTime>
<DestFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/keggle.xnb</DestFile> <DestFile>C:/Users/Semejkin_AV/Documents/Github_repos/ProgtimeHack2022_Bowling/Bowling/Content/bin/Windows/keggle.xnb</DestFile>
<DestTime>2022-04-23T23:12:15.4604061+03:00</DestTime> <DestTime>2022-04-23T23:34:45.4964315+03:00</DestTime>
<Importer>TextureImporter</Importer> <Importer>TextureImporter</Importer>
<ImporterTime>2020-08-10T16:17:54+03:00</ImporterTime> <ImporterTime>2020-08-10T16:17:54+03:00</ImporterTime>
<Processor>TextureProcessor</Processor> <Processor>TextureProcessor</Processor>

View file

@ -93,7 +93,7 @@ namespace Bowling
{ {
for (int j = 0; j < count; j++) for (int j = 0; j < count; j++)
{ {
pins.Add(new Pin(keggle_texture, new Vector2(_graphics.PreferredBackBufferWidth - 150 * modifier + i * keggle_texture.Width * modifier, j * keggle_texture.Height * modifier + gutter_top_y - keggle_texture.Height * count / 2 * modifier + keggle_texture.Height * 5 + 30))); pins.Add(new Pin(keggle_texture, new Vector2(_graphics.PreferredBackBufferWidth - 150 * modifier + i * keggle_texture.Width * modifier, j * keggle_texture.Height * modifier + gutter_top_y - keggle_texture.Height * count / 2 * modifier + keggle_texture.Height * 5 + 40)));
} }
count += 1; count += 1;
} }
@ -123,7 +123,7 @@ namespace Bowling
if (connect.ShowDialog() == DialogResult.OK) if (connect.ShowDialog() == DialogResult.OK)
{ {
gameState = GameState.Menu; gameState = GameState.Menu;
player1 = new Player() { Name = connect.Name, Score = new List<int>() }; player1 = new Player() { Name = connect.name, Score = new List<int>() };
NetLib.NetLib.IP = connect.IP; NetLib.NetLib.IP = connect.IP;
NetLib.NetLib.port = connect.Port; NetLib.NetLib.port = connect.Port;
NetLib.NetLib.Connect(); NetLib.NetLib.Connect();
@ -153,8 +153,8 @@ namespace Bowling
if (counter >= 300) if (counter >= 300)
{ {
gameState = GameState.Menu; gameState = GameState.Menu;
NetLib.NetLib.Send("11");
counter = 0; counter = 0;
NetLib.NetLib.Send("11");
} }
break; break;
case GameState.PauseGame: case GameState.PauseGame:

View file

@ -32,7 +32,7 @@ namespace Bowling_Server
} }
StartGame(group); StartGame(group);
} }
Thread.Sleep(1000); Thread.Sleep(500);
} }
}); });
matchmakingThread.Start(); matchmakingThread.Start();
@ -100,12 +100,12 @@ namespace Bowling_Server
string json = Encoding.ASCII.GetString(data, 0, dataLength); string json = Encoding.ASCII.GetString(data, 0, dataLength);
if (json == "11") if (json == "11")
{ {
//foreach (var player in group) foreach (var player in group)
//{ {
player.socket.Send(Encoding.ASCII.GetBytes("11")); player.socket.Send(Encoding.ASCII.GetBytes("11"));
player.Score = new List<int>(); player.Score = new List<int>();
players.Add(player); players.Add(player);
//} }
break; break;
} }
player.Deserialize(json); player.Deserialize(json);
@ -120,11 +120,13 @@ namespace Bowling_Server
if (group.IndexOf(player) == 1) if (group.IndexOf(player) == 1)
{ {
group[0].socket.Send(Encoding.ASCII.GetBytes("11")); group[0].socket.Send(Encoding.ASCII.GetBytes("11"));
group[0].Score = new List<int>();
players.Add(group[0]); players.Add(group[0]);
} }
else else
{ {
group[1].socket.Send(Encoding.ASCII.GetBytes("11")); group[1].socket.Send(Encoding.ASCII.GetBytes("11"));
group[1].Score = new List<int>();
players.Add(group[1]); players.Add(group[1]);
} }
} }
@ -137,5 +139,9 @@ namespace Bowling_Server
thread.Start(); thread.Start();
} }
} }
public void Die()
{
}
} }
} }