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();
|
AttemptGrapple();
|
||||||
}
|
}
|
||||||
if (playerInput.actions["Grapple"].WasReleasedThisFrame())
|
if (playerInput.actions["Grapple"].WasReleasedThisFrame() && grapplingRope.isGrappling)
|
||||||
{
|
{
|
||||||
LetGoOfGrapple();
|
LetGoOfGrapple();
|
||||||
}
|
}
|
||||||
@ -315,6 +315,10 @@ public class PlayerBehavior : MonoBehaviour
|
|||||||
|
|
||||||
// this.stateController.SetDeathCanvasActive(true);
|
// this.stateController.SetDeathCanvasActive(true);
|
||||||
|
|
||||||
|
if (grapplingRope.isGrappling) {
|
||||||
|
LetGoOfGrapple();
|
||||||
|
}
|
||||||
|
|
||||||
// destroy all tambourines
|
// destroy all tambourines
|
||||||
GameObject[] currentTambourines = GameObject.FindGameObjectsWithTag("tambourine");
|
GameObject[] currentTambourines = GameObject.FindGameObjectsWithTag("tambourine");
|
||||||
foreach (GameObject tambourine in currentTambourines)
|
foreach (GameObject tambourine in currentTambourines)
|
||||||
|
Loading…
Reference in New Issue
Block a user