fix vanish unhook
This commit is contained in:
parent
b50661c8d3
commit
8727aaceaa
@ -179,8 +179,9 @@ public void Stun(float duration){
|
|||||||
Invoke("UnStun", duration);
|
Invoke("UnStun", duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Unhook(){
|
public void Unhook(GameObject hookedObj){
|
||||||
EndGrapple();
|
if(hookedObj.Equals(hookedTo))
|
||||||
|
EndGrapple();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user