void ThrowPipebomb() { Rigidbody pipebombInstance; pipebombInstance = Instantiate(pipebombPrefab, pipebombThrowPosition.position, pipebombThrowPosition.rotation) as Rigidbody; pipebombInstance.AddForce(pipebombThrowPosition.forward * 100); pipebombInstance.AddForce(pipebombThrowPosition.up * 100); Destroy(pipebombInstance, 4f); inv.pipebombCount -= 1; if (inv.pipebombCount == 0) { SS.ChangeSlots(SS.nothingEquipped); } }
void UnlockDoor() //Called when the player successfully finishes unlocking a door { inv.keysCount -= 1; SS.ChangeSlots(SS.nothingEquipped); lockedDoor.SetActive(false); unlockedDoor.SetActive(true); isTouchingLockedDoor = false; }