public void OpenAfterCrateOpeningInterface() { PlayerEquipmentsDatas playerEquipmentsData = PlayerDataSaver.LoadPlayerEquipmentsDatas(); //cratesParent.position = Vector3.SmoothDamp(cratesParent.position, cratesPositionWhenAllOpened.position, ref Vector3.zero, 1.5f); if (IntersceneManager.intersceneManager != null) { int numberOfTooMuchEquipments = playerLootManager.GetAllLootedEquipments.Count + playerEquipmentsData.GetPlayerEquipmentsInventory.Count - IntersceneManager.intersceneManager.GetPlayerDatas.GetPlayerInventoryCapacity; if (numberOfTooMuchEquipments > 0) { tooMuchLootButton.gameObject.SetActive(true); afterLootFinishedPanel.SetActive(false); tooMuchLootButton.SetButtonLabel("There's too much for us to carry. We have to throw " + numberOfTooMuchEquipments + " equipments."); } else { OpenReadyToContinuePanel(); } } else { OpenReadyToContinuePanel(); } }
public void SetPlayerHandedType(HandedType handedType) { playerHandedType = handedType; sideHandedButton.SetButtonLabel((handedType == HandedType.LeftHanded ? "Left-Handed" : "Right-Handed")); PlayerPrefs.SetInt("HandSide", (int)playerHandedType); }
public void ChangeSoundState() { if (soundOff) { soundOff = false; AudioListener.volume = 1f; soundOnOffButton.SetButtonLabel("Volume : On"); } else { soundOff = true; AudioListener.volume = 0f; soundOnOffButton.SetButtonLabel("Volume : Off"); } PlayerPrefs.SetInt("SoundOff", soundOff ? 1 : 0); }
public void SetPlayerHandedType(HandedType handedType) { playerHandedType = handedType; GameManager.gameManager.PlrInterface.SetUpSideHanded(playerHandedType); sideHandedButton.SetButtonLabel((handedType == HandedType.LeftHanded ? "Left-Handed" : "Right-Handed")); PlayerPrefs.SetInt("HandSide", (int)playerHandedType); }