added basic pause menu

This commit is contained in:
slevy14
2023-04-25 10:59:49 -07:00
parent 34bb1be2fb
commit cea079d243
9 changed files with 666 additions and 43 deletions

View File

@@ -132,11 +132,14 @@ public class PlayerBehavior : MonoBehaviour
}
void LetGoOfGrapple() {
if (tambourine != null && grapplingRope.isGrappling)
{
bool currentlyPaused = GameObject.Find("PauseMenu").GetComponent<PauseController>().isPaused;
if (grapplingRope.isGrappling && !currentlyPaused) {
print("currently paused is " + currentlyPaused + ", releasing grapple");
if (tambourine != null) {
tambourine.GetComponent<TambourineBehavior>().DestroySelf();
}
grapplingGun.ReleaseGrapple();
}
}
void OnTriggerEnter2D(Collider2D col)