merge commit. Added fix player and monsters
This commit is contained in:
parent
c05d13a68b
commit
dcc845a517
1 changed files with 1 additions and 1 deletions
|
@ -147,7 +147,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
|
||||||
{
|
{
|
||||||
StartCicycleAnimation("playerShootRight");
|
StartCicycleAnimation("playerShootRight");
|
||||||
var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)(Pos.Y - 10f), shootLength + 24, 10), typeof(Zombie)).OrderBy(x => (x.Pos - Pos).LengthSquared());
|
var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)(Pos.Y - 10f), shootLength + 24, 10), typeof(Zombie)).OrderBy(x => (x.Pos - Pos).LengthSquared());
|
||||||
if (targets != null)
|
if (targets.Count() > 0)
|
||||||
{
|
{
|
||||||
Zombie targetZombie = (Zombie)targets.First();
|
Zombie targetZombie = (Zombie)targets.First();
|
||||||
targetZombie.TakeDamage();
|
targetZombie.TakeDamage();
|
||||||
|
|
Loading…
Add table
Reference in a new issue