fix vanish unhook

This commit is contained in:
Soulaha Balde 2022-10-23 21:16:49 -04:00
parent b50661c8d3
commit 8727aaceaa
2 changed files with 4 additions and 3 deletions

View File

@ -179,7 +179,8 @@ public void Stun(float duration){
Invoke("UnStun", duration); Invoke("UnStun", duration);
} }
public void Unhook(){ public void Unhook(GameObject hookedObj){
if(hookedObj.Equals(hookedTo))
EndGrapple(); EndGrapple();
} }
#endregion #endregion

View File

@ -39,7 +39,7 @@ public class Vanisher : MonoBehaviour
} }
private void Vanish(){ private void Vanish(){
grapple?.Unhook(); grapple?.Unhook(this.gameObject);
gameObject.SetActive(false); gameObject.SetActive(false);
Invoke("Appear", timeToAppear); Invoke("Appear", timeToAppear);
isVanishing = false; isVanishing = false;