diff --git a/logic/Client/MainWindow.xaml.cs b/logic/Client/MainWindow.xaml.cs index 41d93f4..14ed777 100644 --- a/logic/Client/MainWindow.xaml.cs +++ b/logic/Client/MainWindow.xaml.cs @@ -247,8 +247,8 @@ namespace Client TextBox icon = new() { FontSize = 10, - Width = 20, - Height = 20, + Width = unitWidth, + Height = unitHeight, Text = text, HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, @@ -764,11 +764,12 @@ namespace Client { Ellipse icon = new() { - Width = 10, - Height = 10, + Width = unitWidth * radiusTimes, + Height = unitHeight * radiusTimes, HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, - Margin = new Thickness(data.Y * unitWidth / 1000.0 - unitWidth / 2, data.X * unitHeight / 1000.0 - unitHeight / 2, 0, 0), + Margin = new Thickness(data.Y * unitWidth / 1000.0 - unitWidth * radiusTimes / 2, data.X * unitHeight / 1000.0 - unitHeight * radiusTimes / 2, 0, 0), + Fill = Brushes.Red, }; switch (data.Type) { @@ -778,9 +779,8 @@ namespace Client case Protobuf.BulletType.CommonAttackOfTricker: case Protobuf.BulletType.BombBomb: case Protobuf.BulletType.JumpyDumpty: - icon.Fill = Brushes.Red; - break; default: + icon.Fill = Brushes.Red; break; } UpperLayerOfMap.Children.Add(icon); @@ -1194,8 +1194,8 @@ namespace Client } catch (Exception) { - // ErrorDisplayer error = new("发生错误。以下是系统报告\n" + exc.ToString()); - // error.Show(); + //ErrorDisplayer error = new("发生错误。以下是系统报告\n" + exc.ToString()); + //error.Show(); } } @@ -1243,8 +1243,8 @@ namespace Client } catch (Exception) { - // ErrorDisplayer error = new(exc.Message); - // error.Show(); + //ErrorDisplayer error = new(exc.Message) + //error.Show() } } diff --git a/logic/Client/PlaybackClient.cs b/logic/Client/PlaybackClient.cs index 322de19..a09a6ed 100644 --- a/logic/Client/PlaybackClient.cs +++ b/logic/Client/PlaybackClient.cs @@ -52,7 +52,7 @@ namespace Client { var msg = mapCollecter.ReadOne(); if (msg == null) - throw new Exception("Map messgae is not in the playback file!"); + throw new Exception("Map message is not in the playback file!"); foreach (var obj in msg.ObjMessage) { if (obj.MessageOfObjCase == MessageOfObj.MessageOfObjOneofCase.MapMessage) @@ -78,7 +78,6 @@ namespace Client break; } } - }; new Thread(() => diff --git a/logic/Client/Properties/launchSettings.json b/logic/Client/Properties/launchSettings.json index 522f015..0d108bf 100644 --- a/logic/Client/Properties/launchSettings.json +++ b/logic/Client/Properties/launchSettings.json @@ -2,7 +2,7 @@ "profiles": { "Client": { "commandName": "Project", - "commandLineArgs": "--cl --ip 127.0.0.1 --port 8888 --characterID 0 --type 1 --occupation 1" + "commandLineArgs": " --cl --port 8888 --characterID 0 --type 1 --occupation 1" } } } \ No newline at end of file diff --git a/logic/Server/Properties/launchSettings.json b/logic/Server/Properties/launchSettings.json index ea860e8..3c816a4 100644 --- a/logic/Server/Properties/launchSettings.json +++ b/logic/Server/Properties/launchSettings.json @@ -2,7 +2,7 @@ "profiles": { "Server": { "commandName": "Project", - "commandLineArgs": "--ip 0.0.0.0 -p 8888 --teamCount 1 --studentCount 1 --trickerCount 0" + "commandLineArgs": "--ip 0.0.0.0 -p 8888 --studentCount 1 --trickerCount 1" } } } \ No newline at end of file diff --git a/logic/cmd/gameServer.cmd b/logic/cmd/gameServer.cmd index 50a963a..aaca460 100644 --- a/logic/cmd/gameServer.cmd +++ b/logic/cmd/gameServer.cmd @@ -4,7 +4,7 @@ start cmd /k ..\Server\bin\Debug\net6.0\Server.exe --ip 0.0.0.0 --port 8888 --s ping -n 2 127.0.0.1 > NUL -start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 4 --type 2 --occupation 2 +start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 4 --type 2 --occupation 1 ping -n 2 127.0.0.1 > NUL diff --git a/logic/cmd/playback.cmd b/logic/cmd/playback.cmd index fe1fb14..018b69a 100644 --- a/logic/cmd/playback.cmd +++ b/logic/cmd/playback.cmd @@ -1,3 +1,5 @@ @echo off -start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --playbackFile D:\2_autumn\thuai6\THUAI6\logic\cmd\test.thuaipb \ No newline at end of file +start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --playbackFile D:\2_autumn\thuai6\THUAI6\logic\cmd\test.thuaipb + +ping -n 2 127.0.0.1 > NUL \ No newline at end of file