Finished up improving static object colliders. Added network improvements to interactions, still half-baked.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
using FishNet.Object;
|
||||
using FMOD.Studio;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.XR.CoreUtils;
|
||||
using UnityEngine;
|
||||
using FMOD.Studio;
|
||||
|
||||
using static MouseLook;
|
||||
|
||||
public class CarDrivingRoutine : MonoBehaviour
|
||||
public class CarDrivingRoutine : NetworkBehaviour
|
||||
{
|
||||
public AudioSource _stopSound;
|
||||
public AudioSource _tireSound;
|
||||
@@ -124,7 +124,7 @@ public class CarDrivingRoutine : MonoBehaviour
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{;
|
||||
if (other.GetComponent<XROrigin>() == null) return;
|
||||
if (other.GetComponentInParent<XRPlayerMirror>() == null) return;
|
||||
StartCoroutine(SmoothAdjustSpeed(0, 0, haltspeed)); // Smoothly halt in 1 second
|
||||
_tireSound.Stop();
|
||||
_stopSound.Play();
|
||||
@@ -135,7 +135,7 @@ public class CarDrivingRoutine : MonoBehaviour
|
||||
|
||||
private void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (other.GetComponent<XROrigin>() == null) return;
|
||||
if (other.GetComponentInParent<XRPlayerMirror>() == null) return;
|
||||
StartCoroutine(SmoothAdjustSpeed(targetSpeed, targetRotationSpeed, haltspeed)); // Smoothly resume speed in 1 second
|
||||
_stopSound.Stop();
|
||||
_tireSound.Play();
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
using FishNet.Object;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
public class Carbehavior : MonoBehaviour
|
||||
public class Carbehavior : NetworkBehaviour
|
||||
{
|
||||
public AudioSource _carAlarm;
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
using _PROJECT.NewHandPresence;
|
||||
using FishNet.Object;
|
||||
using FMODUnity;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.XR.CoreUtils;
|
||||
using UnityEngine;
|
||||
using UnityEngine.XR.Content.Interaction;
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
using FMODUnity;
|
||||
|
||||
public class PassangerSeat : LocomotionProvider
|
||||
public class PassangerSeat : NetworkBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
public GameObject ExitSpot;
|
||||
@@ -45,7 +46,6 @@ public class PassangerSeat : LocomotionProvider
|
||||
player.transform.localPosition = -cameraShift;
|
||||
player.transform.localRotation = Quaternion.identity;
|
||||
cameraTransform.localRotation = this.transform.rotation;
|
||||
BeginLocomotion();
|
||||
disablePlayerLocomotion(player);
|
||||
}
|
||||
private void disablePlayerLocomotion(XROrigin player)
|
||||
@@ -70,7 +70,6 @@ public class PassangerSeat : LocomotionProvider
|
||||
public void ExitCar()
|
||||
{
|
||||
if (currentPassanger == null) return;
|
||||
EndLocomotion();
|
||||
enablePlayerLocomotion(currentPassanger);
|
||||
|
||||
TutorialController cameraChild = currentPassanger.GetComponentInChildren<TutorialController>();
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using FishNet.Object;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Waypoint : MonoBehaviour
|
||||
public class Waypoint : NetworkBehaviour
|
||||
{
|
||||
public float DesiredRotation = 0;
|
||||
public Waypoint Next;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using FishNet.Object;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class KeyboardManager : MonoBehaviour
|
||||
public class KeyboardManager : NetworkBehaviour
|
||||
{
|
||||
public enum ShiftMode { Lowercase, NextUppercase, Uppercase }
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using FishNet.Object;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@@ -5,7 +6,7 @@ using System.Linq;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class ScoreBoard : MonoBehaviour
|
||||
public class ScoreBoard : NetworkBehaviour
|
||||
{
|
||||
[System.Serializable]
|
||||
public class ScoreEntry
|
||||
|
||||
@@ -491,7 +491,7 @@ GameObject:
|
||||
- component: {fileID: 682103954761243621}
|
||||
- component: {fileID: 7057699864170177475}
|
||||
m_Layer: 0
|
||||
m_Name: Button (1)
|
||||
m_Name: Multiplayer button
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -904,7 +904,7 @@ GameObject:
|
||||
- component: {fileID: 972804331316405723}
|
||||
- component: {fileID: 4409105029378525441}
|
||||
m_Layer: 0
|
||||
m_Name: Button
|
||||
m_Name: Start Playing Button
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -1692,7 +1692,7 @@ GameObject:
|
||||
- component: {fileID: 150987804393607111}
|
||||
- component: {fileID: 2849620166313326850}
|
||||
- component: {fileID: 3623653364064856318}
|
||||
- component: {fileID: 8520142921819688320}
|
||||
- component: {fileID: 7426565597011524732}
|
||||
m_Layer: 0
|
||||
m_Name: NetworkManagerUI
|
||||
m_TagString: Untagged
|
||||
@@ -1791,7 +1791,7 @@ AudioListener:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8920648335286241163}
|
||||
m_Enabled: 1
|
||||
--- !u!114 &8520142921819688320
|
||||
--- !u!114 &7426565597011524732
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -1800,15 +1800,16 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 8920648335286241163}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0be1f6fa249e2b74d80c57af214b930d, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: 891e12d2218566241a2acd395d5d3892, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
VRToggle: {fileID: 48284653022802127}
|
||||
startPlayingButton: {fileID: 4409105029378525441}
|
||||
reloadButton: {fileID: 3248072787155925101}
|
||||
joinMultiplayerButton: {fileID: 7057699864170177475}
|
||||
serverListContainer: {fileID: 6604224998162932651}
|
||||
serverListItemPrefab: {fileID: 8799561993934626415}
|
||||
serverListContainer: {fileID: 1182580605524482518}
|
||||
IPButton: {fileID: 8155264290485183093, guid: 161eef8a6244baa46b0988be67d74a08,
|
||||
type: 3}
|
||||
statusText: {fileID: 2762709333159616741}
|
||||
quitButton: {fileID: 856744223094475457}
|
||||
networkDiscovery: {fileID: 0}
|
||||
|
||||
Reference in New Issue
Block a user