IEnumerator Death() { PostProcessControl.PostExposureFade(-10, .01f); yield return(new WaitForSeconds(2f)); GameManager.NextScene(); }
public static IEnumerator MoveToIntroScene() { PostProcessControl.PostExposureFade(-10, .025f); GlobalAudio.GlobalAudioFadeOut(); yield return(new WaitForSeconds(1.5f)); //DeacivateIntro(); //PostProcessControl.PostExposureFade(-10, 0, .025f); //_escapeHouseText.SetActive(true); _sceneToLoad.SetActive(true); }
public void CloseInventory() { PostProcessControl.PostExposureFade(_exposureInventoryOff, _exposureFadeSpeed); //PostProcessControl.DOFFade(_focalLengthInventoryOff, _focusDistanceInventoryOff, _focalLengthFadeSpeed, _focusDistanceFadeSpeed); //print("closing inventory"); _isInventoryOpen = false; _inventoryObj.SetActive(false); PlaceItemsInInventory(true, false); //ShowInventoryItems(false); _firstPressUp = false; }
void Update() { //if (_trackedObj.gameObject.activeInHierarchy) //{ // _device = SteamVR_Controller.Input((int)_trackedObj.index); //} if (PlayerScript._deviceDominant.GetPressDown(SteamVR_Controller.ButtonMask.Touchpad) && !_isInventoryOpen) { _isInventoryOpen = true; //CheckInventoryItemPlacement(); _inventoryObj.SetActive(true); //ShowInventoryItems(true); PostProcessControl.PostExposureFade(_exposureInventoryOn, _exposureFadeSpeed); //PostProcessControl.DOFFade(_focalLengthInventoryOn, _focusDistanceInventoryOn, _focalLengthFadeSpeed, _focusDistanceFadeSpeed); HapticFeedback.HapticAmount(500, true, false); PlaceItemsInInventory(false, true); CheckHandModelVisibility(); //_handModelObj.gameObject.SetActive(true); //if (_inHandObj != null) //{ // _inHandObj.SetActive(false); // _hasItemInHand = false; //} } if (_isInventoryOpen) { OpenInventory(); } //if (_hasItemInHand) //{ // _inHandObj.transform.position = Vector3.Lerp(_inHandObj.transform.position, transform.position, Time.deltaTime * 12f); // _inHandObj.transform.rotation = Quaternion.Slerp(_inHandObj.transform.rotation, transform.rotation, Time.deltaTime * 12f); //} else //{ // foreach (var slot in _inventorySlots) // { // if (slot.hasItemInHand) // { // PutInInventory(slot); // } // } //} }