dash hits enemies now
This commit is contained in:
parent
26c0c2c9a7
commit
1ba24d1faf
3 changed files with 36 additions and 17 deletions
|
|
@ -26,7 +26,6 @@ public sealed partial class Hitbox : Area2D
|
|||
{
|
||||
BodyEntered += OnEntered;
|
||||
BodyExited += OnLeft;
|
||||
SetPhysicsProcess(true);
|
||||
}
|
||||
|
||||
public void OnResolved() => HitboxOwner.OnHitboxAdded(this);
|
||||
|
|
@ -68,14 +67,15 @@ public sealed partial class Hitbox : Area2D
|
|||
{
|
||||
if (Engine.IsEditorHint()) Visible = true;
|
||||
_checkingForHits = true;
|
||||
foreach (var immunityEntry in _immunityEntries.Values)
|
||||
immunityEntry.HitCount = 0;
|
||||
SetPhysicsProcess(true);
|
||||
}
|
||||
|
||||
public void StopAttack()
|
||||
{
|
||||
if (Engine.IsEditorHint()) Visible = false;
|
||||
_checkingForHits = false;
|
||||
_immunityEntries.Clear();
|
||||
SetPhysicsProcess(false);
|
||||
}
|
||||
|
||||
private sealed class ImmunityEntry
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue