fixed what happens if the player is grappling and dies
This commit is contained in:
parent
2dd782e72f
commit
da4a9efbdd
@ -83,7 +83,7 @@ public class PlayerBehavior : MonoBehaviour
|
||||
{
|
||||
AttemptGrapple();
|
||||
}
|
||||
if (playerInput.actions["Grapple"].WasReleasedThisFrame())
|
||||
if (playerInput.actions["Grapple"].WasReleasedThisFrame() && grapplingRope.isGrappling)
|
||||
{
|
||||
LetGoOfGrapple();
|
||||
}
|
||||
@ -315,6 +315,10 @@ public class PlayerBehavior : MonoBehaviour
|
||||
|
||||
// this.stateController.SetDeathCanvasActive(true);
|
||||
|
||||
if (grapplingRope.isGrappling) {
|
||||
LetGoOfGrapple();
|
||||
}
|
||||
|
||||
// destroy all tambourines
|
||||
GameObject[] currentTambourines = GameObject.FindGameObjectsWithTag("tambourine");
|
||||
foreach (GameObject tambourine in currentTambourines)
|
||||
|
Loading…
Reference in New Issue
Block a user