diff --git a/Asteroids.cs b/Asteroids.cs index 846f614..f202e63 100644 --- a/Asteroids.cs +++ b/Asteroids.cs @@ -26,7 +26,6 @@ public class AllAst foreach (var item in As) { bullet rm = null; - Rectangle cent = new Rectangle(item.Rect.X - item.Rect.Width / 2, item.Rect.Y - item.Rect.Height / 2, item.Rect.Width, item.Rect.Height); foreach (var it in PL.Bullets) { if (item.Rect.Intersects(it.Rect)) @@ -68,14 +67,13 @@ public class AllAst EX.Add(new Explosion(ase.Rect)); return true; } - Rectangle cent = new Rectangle(ase.Rect.X - ase.Rect.Width / 2, ase.Rect.Y -ase.Rect.Height / 2, ase.Rect.Width, ase.Rect.Height); - if (cent.Intersects(PL.Rect)) + if (ase.Rect.Intersects(PL.Rect)) { PL.Health--; EX.Add(new Explosion(ase.Rect)); return true; } - if (!cent.Intersects(vars.PlayArea)) + if (!ase.Rect.Intersects(vars.PlayArea)) { return true; } diff --git a/obj/Debug/net6.0/Asteroids.GeneratedMSBuildEditorConfig.editorconfig b/obj/Debug/net6.0/Asteroids.GeneratedMSBuildEditorConfig.editorconfig index 3174cef..b4ed1b5 100644 --- a/obj/Debug/net6.0/Asteroids.GeneratedMSBuildEditorConfig.editorconfig +++ b/obj/Debug/net6.0/Asteroids.GeneratedMSBuildEditorConfig.editorconfig @@ -7,4 +7,4 @@ build_property.InvariantGlobalization = build_property.PlatformNeutralAssembly = build_property._SupportedPlatformList = Linux,macOS,Windows build_property.RootNamespace = Asteroids -build_property.ProjectDir = E:\Repos\Asteroids\ +build_property.ProjectDir = e:\Repos\Asteroids\