Possible Bug Fix for Inviciblity

This commit is contained in:
Philip W 2021-11-11 10:07:37 +00:00
parent 72ac987a3d
commit 819fdbe401

View File

@ -46,7 +46,7 @@ public class EnemyReturn : Physics2DObject
this.GetComponent<SpriteRenderer>().flipY = false; this.GetComponent<SpriteRenderer>().flipY = false;
isReturning = true; isReturning = true;
} }
else if (playerTag == "Bullet") if (playerTag == "Bullet")
{ {
if (deathEffect != null) if (deathEffect != null)
{ {
@ -60,7 +60,7 @@ public class EnemyReturn : Physics2DObject
} }
Destroy(gameObject); Destroy(gameObject);
} }
else if (playerTag == "Finish" && hasDroppableObject) if (playerTag == "Finish" && hasDroppableObject)
{ {
HealthSystemAttribute healthScript = GameObject.Find("CollisionDetector").gameObject.GetComponent<HealthSystemAttribute>(); HealthSystemAttribute healthScript = GameObject.Find("CollisionDetector").gameObject.GetComponent<HealthSystemAttribute>();
if (healthScript != null) if (healthScript != null)