People die when they are killed
This means that enemies can now kill the players without mercy.
This commit is contained in:
@@ -147,19 +147,21 @@ namespace DepthsBelow
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var entity in entityManager.Entities) {
|
||||
if (entity is Soldier)
|
||||
|
||||
GetComponent<PathFinder>().Stop();
|
||||
}
|
||||
foreach (var entity in entityManager.Entities)
|
||||
{
|
||||
if (entity is Soldier)
|
||||
{
|
||||
if (entity.GetComponent<Component.Collision>().Rectangle.Intersects(this.GetComponent<Component.Collision>().Rectangle))
|
||||
{
|
||||
if (entity.GetComponent<Component.Collision>().Rectangle.Intersects(this.GetComponent<Component.Collision>().Rectangle))
|
||||
if (Utility.AttackTest(this.GetComponent<Component.Stat>(), entity, Utility.CalculateHitChance(this.GetComponent<Component.Stat>(), this.Transform.World.Position, entity)))
|
||||
{
|
||||
if (Utility.AttackTest(this.GetComponent<Component.Stat>(), entity, Utility.CalculateHitChance(this.GetComponent<Component.Stat>(), this.Transform.World.Position, entity)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
GetComponent<PathFinder>().Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user