kõik vanad helid lisatud, peaaegu kõik esimese iteratsiooni helid on lisatud, auto jaoks üks lisaloogika on tehtud

This commit is contained in:
Timur Nizamov
2025-10-20 00:02:08 +03:00
parent 2e61259ebe
commit 48860cf906
77 changed files with 2291 additions and 138 deletions

View File

@@ -5,6 +5,7 @@ using Unity.XR.CoreUtils;
using UnityEngine;
using UnityEngine.XR.Content.Interaction;
using UnityEngine.XR.Interaction.Toolkit;
using FMODUnity;
public class PassangerSeat : LocomotionProvider
{
@@ -36,9 +37,9 @@ public class PassangerSeat : LocomotionProvider
Transform cameraTransform = cameraChild.transform.parent.transform;
Vector3 cameraShift = cameraTransform.localPosition;
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.DoorOpen, gameObject);
AudioManager.Instance.SetGlobalParameter("CarPassengerLogic", 2.0f); //change the value of the global parameter in FMOD, changed value
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.DoorOpen, gameObject); //play 3d oneshot
currentPassanger = player;
player.transform.SetParent(this.transform);
player.transform.localPosition = -cameraShift;
@@ -76,8 +77,8 @@ public class PassangerSeat : LocomotionProvider
if (cameraChild == null) return;
Transform cameraTransform = cameraChild.transform.parent.transform;
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.DoorClose, gameObject);
AudioManager.Instance.SetGlobalParameter("CarPassengerLogic", 0.0f); //change the value of the global parameter in FMOD, initial value
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.DoorClose, gameObject); //play 3d oneshot
// Set the player<65>s parent to null (making it part of the scene hierarchy)
currentPassanger.transform.SetParent(null);