v.1.1
This commit is contained in:
parent
a3705bffc2
commit
d0af8bdabc
33 changed files with 26 additions and 23 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3
Bowling/Connect.Designer.cs
generated
3
Bowling/Connect.Designer.cs
generated
|
@ -44,6 +44,7 @@
|
|||
this.NameTB.Name = "NameTB";
|
||||
this.NameTB.Size = new System.Drawing.Size(224, 27);
|
||||
this.NameTB.TabIndex = 0;
|
||||
this.NameTB.Text = "test";
|
||||
//
|
||||
// IPTB
|
||||
//
|
||||
|
@ -51,6 +52,7 @@
|
|||
this.IPTB.Name = "IPTB";
|
||||
this.IPTB.Size = new System.Drawing.Size(224, 27);
|
||||
this.IPTB.TabIndex = 1;
|
||||
this.IPTB.Text = "127.0.0.1";
|
||||
//
|
||||
// PortTB
|
||||
//
|
||||
|
@ -58,6 +60,7 @@
|
|||
this.PortTB.Name = "PortTB";
|
||||
this.PortTB.Size = new System.Drawing.Size(224, 27);
|
||||
this.PortTB.TabIndex = 2;
|
||||
this.PortTB.Text = "7632";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 276 B After Width: | Height: | Size: 980 B |
|
@ -1,8 +1,2 @@
|
|||
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/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
|
||||
"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
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?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">
|
||||
<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>
|
||||
<DestTime>2022-04-23T14:37:54.0070101+03:00</DestTime>
|
||||
<DestTime>2022-04-23T23:52:18.2788162+03:00</DestTime>
|
||||
<Importer>TextureImporter</Importer>
|
||||
<ImporterTime>2020-08-10T16:17:54+03:00</ImporterTime>
|
||||
<Processor>TextureProcessor</Processor>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?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">
|
||||
<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>
|
||||
<DestTime>2022-04-23T23:12:15.4604061+03:00</DestTime>
|
||||
<DestTime>2022-04-23T23:34:45.4964315+03:00</DestTime>
|
||||
<Importer>TextureImporter</Importer>
|
||||
<ImporterTime>2020-08-10T16:17:54+03:00</ImporterTime>
|
||||
<Processor>TextureProcessor</Processor>
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace Bowling
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ namespace Bowling
|
|||
if (connect.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
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.port = connect.Port;
|
||||
NetLib.NetLib.Connect();
|
||||
|
@ -153,8 +153,8 @@ namespace Bowling
|
|||
if (counter >= 300)
|
||||
{
|
||||
gameState = GameState.Menu;
|
||||
NetLib.NetLib.Send("11");
|
||||
counter = 0;
|
||||
NetLib.NetLib.Send("11");
|
||||
}
|
||||
break;
|
||||
case GameState.PauseGame:
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -32,7 +32,7 @@ namespace Bowling_Server
|
|||
}
|
||||
StartGame(group);
|
||||
}
|
||||
Thread.Sleep(1000);
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
});
|
||||
matchmakingThread.Start();
|
||||
|
@ -83,7 +83,7 @@ namespace Bowling_Server
|
|||
|
||||
static void StartGame(List<Player> group)
|
||||
{
|
||||
|
||||
|
||||
Console.WriteLine("OK");
|
||||
CastOpponents(group);
|
||||
foreach (var player in group)
|
||||
|
@ -100,12 +100,12 @@ namespace Bowling_Server
|
|||
string json = Encoding.ASCII.GetString(data, 0, dataLength);
|
||||
if (json == "11")
|
||||
{
|
||||
//foreach (var player in group)
|
||||
//{
|
||||
player.socket.Send(Encoding.ASCII.GetBytes("11"));
|
||||
player.Score = new List<int>();
|
||||
players.Add(player);
|
||||
//}
|
||||
foreach (var player in group)
|
||||
{
|
||||
player.socket.Send(Encoding.ASCII.GetBytes("11"));
|
||||
player.Score = new List<int>();
|
||||
players.Add(player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
player.Deserialize(json);
|
||||
|
@ -120,11 +120,13 @@ namespace Bowling_Server
|
|||
if (group.IndexOf(player) == 1)
|
||||
{
|
||||
group[0].socket.Send(Encoding.ASCII.GetBytes("11"));
|
||||
group[0].Score = new List<int>();
|
||||
players.Add(group[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
group[1].socket.Send(Encoding.ASCII.GetBytes("11"));
|
||||
group[1].Score = new List<int>();
|
||||
players.Add(group[1]);
|
||||
}
|
||||
}
|
||||
|
@ -137,5 +139,9 @@ namespace Bowling_Server
|
|||
thread.Start();
|
||||
}
|
||||
}
|
||||
public void Die()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Reference in a new issue