kõik vanad helid lisatud, peaaegu kõik esimese iteratsiooni helid on lisatud, auto jaoks üks lisaloogika on tehtud
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user