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

View File

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