Commit 454f146f by Alisa Jung

fixed fire and shield respawn (forgot to set transform parent to 0)

parent ae42e08e
...@@ -46,6 +46,7 @@ public class FireScript : MonoBehaviour ...@@ -46,6 +46,7 @@ public class FireScript : MonoBehaviour
{ {
CancelInvoke("stopBurning"); CancelInvoke("stopBurning");
parentHealth = null; parentHealth = null;
transform.parent = null;
transform.position = new Vector2(100, 100); transform.position = new Vector2(100, 100);
Invoke("Activate", respawnTime); Invoke("Activate", respawnTime);
} }
......
...@@ -41,6 +41,7 @@ public class ShieldScript : MonoBehaviour ...@@ -41,6 +41,7 @@ public class ShieldScript : MonoBehaviour
CancelInvoke("stopShielding"); CancelInvoke("stopShielding");
if (parentHealth != null) parentHealth.setShield(false); if (parentHealth != null) parentHealth.setShield(false);
parentHealth = null; parentHealth = null;
transform.parent = null;
transform.position = new Vector2(100, 100); transform.position = new Vector2(100, 100);
Invoke("Activate", respawnTime); Invoke("Activate", respawnTime);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment