Skip to content

Commit

Permalink
fix: destroy enemy immediately(temp)
Browse files Browse the repository at this point in the history
  • Loading branch information
yy4382 committed Mar 27, 2024
1 parent cf40f28 commit c208688
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Assets/Scripts/BulletBehaviour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ void OnCollisionEnter2D(Collision2D other)
{
Debug.Log("Enemy hit by bullet");
Kill(other);
Destroy(other.gameObject);
return;
}

Expand Down
1 change: 1 addition & 0 deletions Assets/Scripts/SpikeBehaviour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ void OnCollisionEnter2D(Collision2D other)
if (other.gameObject.CompareTag("Enemy"))
{
Kill(other);
Destroy(other.gameObject);
return;
}

Expand Down
1 change: 1 addition & 0 deletions Assets/Scripts/SpikeBlockBehaviour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ void OnCollisionEnter2D(Collision2D other)
if (other.gameObject.CompareTag("Enemy"))
{
Kill(other);
Destroy(other.gameObject);
return;
}

Expand Down

0 comments on commit c208688

Please sign in to comment.