fixed centering
This commit is contained in:
parent
c313194009
commit
3b44c3733e
@ -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;
|
||||
}
|
||||
|
@ -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\
|
||||
|
Loading…
x
Reference in New Issue
Block a user