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

@@ -2,12 +2,22 @@ using System.Collections;
using System.Collections.Generic;
using Unity.XR.CoreUtils;
using UnityEngine;
using FMOD.Studio;
public class SpaceEnterCollider : MonoBehaviour
{
public GameObject InstructionText;
private EventInstance PortalEntrance;
private void Awake()
{
PortalEntrance = AudioManager.Instance.CreateInstance(FMODEvents.Instance.PortalEnter);
}
private void OnTriggerEnter(Collider other)
{
XROrigin player = other.GetComponent<XROrigin>();
if (player == null) return;
@@ -30,7 +40,12 @@ public class SpaceEnterCollider : MonoBehaviour
{
playerGravity.isInSpace = true;
}
Debug.Log(other + " entered space.");
PortalEntrance.start();
}
private void OnTriggerExit(Collider other)
@@ -42,9 +57,13 @@ public class SpaceEnterCollider : MonoBehaviour
if (playerGravity != null)
{
StartCoroutine(DelayExit(playerGravity));
//playerGravity.AdjustGravity(new Quaternion()); // Set Gravity back to default
}
Debug.Log(other + " left space.");
PortalEntrance.start();
}
private IEnumerator DelayExit(GravityHandler playerGravity)