|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|