fixed what happens if the player is grappling and dies
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user