fix: widen note lanes and clear warnings
This commit is contained in:
@@ -35,7 +35,7 @@ public static class VRBeatSaberSceneBuilder
|
||||
var scene = EditorSceneManager.OpenScene(gamePath, OpenSceneMode.Single);
|
||||
|
||||
// PlayableManager 제거 (PlayableDirector는 유지)
|
||||
var pm = Object.FindObjectOfType<PlayableManager>();
|
||||
var pm = Object.FindFirstObjectByType<PlayableManager>();
|
||||
if (pm != null)
|
||||
Object.DestroyImmediate(pm);
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ public class DesktopUIMode : MonoBehaviour
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]
|
||||
private static void AutoCreate()
|
||||
{
|
||||
if (FindObjectOfType<DesktopUIMode>() != null) return;
|
||||
if (FindFirstObjectByType<DesktopUIMode>() != null) return;
|
||||
new GameObject("[DesktopUIMode]").AddComponent<DesktopUIMode>();
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public class DesktopUIMode : MonoBehaviour
|
||||
if (cam == null)
|
||||
foreach (var c in FindObjectsByType<Camera>(FindObjectsSortMode.None))
|
||||
if (c.enabled && c.gameObject.scene.name != "DontDestroyOnLoad") { cam = c; break; }
|
||||
cam ??= FindObjectOfType<Camera>();
|
||||
cam ??= FindFirstObjectByType<Camera>();
|
||||
if (cam == null) return;
|
||||
|
||||
foreach (var canvas in FindObjectsByType<Canvas>(FindObjectsSortMode.None))
|
||||
|
||||
@@ -37,11 +37,11 @@ public class NasPublisher : MonoBehaviour
|
||||
|
||||
[Serializable] private class NasConfig
|
||||
{
|
||||
public string host;
|
||||
public string account;
|
||||
public string rootPath;
|
||||
public string staticUrl;
|
||||
public string password;
|
||||
public string host = "";
|
||||
public string account = "";
|
||||
public string rootPath = "";
|
||||
public string staticUrl = "";
|
||||
public string password = "";
|
||||
}
|
||||
|
||||
public IEnumerator Publish(
|
||||
|
||||
@@ -13,6 +13,11 @@ public class SongController : MonoBehaviour
|
||||
[SerializeField] private GameEvent onLevelComplete;
|
||||
[SerializeField] private TMP_Text countdownText;
|
||||
|
||||
private const float LaneSpacing = 0.42f;
|
||||
private const float LayerSpacing = 0.38f;
|
||||
private const float HorizontalCenter = 1.5f;
|
||||
private const float VerticalCenter = 1f;
|
||||
|
||||
private AudioManager _audio;
|
||||
|
||||
private static string CacheRoot =>
|
||||
@@ -20,7 +25,7 @@ public class SongController : MonoBehaviour
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_audio = FindObjectOfType<AudioManager>();
|
||||
_audio = FindFirstObjectByType<AudioManager>();
|
||||
StartCoroutine(LoadAndPlay());
|
||||
}
|
||||
|
||||
@@ -68,7 +73,7 @@ public class SongController : MonoBehaviour
|
||||
Debug.LogError("[SongController] Map parse failed");
|
||||
yield break;
|
||||
}
|
||||
map.target.Sort((a, b) => a.time.CompareTo(b.time));
|
||||
map.target.Sort(CompareNotes);
|
||||
|
||||
yield return StartCoroutine(Countdown());
|
||||
|
||||
@@ -109,8 +114,8 @@ public class SongController : MonoBehaviour
|
||||
|
||||
private void SpawnNote(NoteData note)
|
||||
{
|
||||
float x = -0.375f + note.position * 0.25f;
|
||||
float y = -0.333f + note.lineLayer * 0.333f;
|
||||
float x = MapLaneX(note.position);
|
||||
float y = MapLayerY(note.lineLayer);
|
||||
|
||||
// 스폰 시점의 실제 남은 시간으로 역산 → 동시 노트가 프레임 차이 나도 같은 타이밍에 도착
|
||||
float remaining = note.time - _audio.CurrentTime;
|
||||
@@ -129,6 +134,31 @@ public class SongController : MonoBehaviour
|
||||
VR_BeatManager.instance.Spawn(cubePrefab, info);
|
||||
}
|
||||
|
||||
private static int CompareNotes(NoteData a, NoteData b)
|
||||
{
|
||||
int timeCompare = a.time.CompareTo(b.time);
|
||||
if (timeCompare != 0)
|
||||
return timeCompare;
|
||||
|
||||
int positionCompare = a.position.CompareTo(b.position);
|
||||
if (positionCompare != 0)
|
||||
return positionCompare;
|
||||
|
||||
return a.lineLayer.CompareTo(b.lineLayer);
|
||||
}
|
||||
|
||||
private static float MapLaneX(int position)
|
||||
{
|
||||
int lane = Mathf.Clamp(position, 0, 3);
|
||||
return (lane - HorizontalCenter) * LaneSpacing;
|
||||
}
|
||||
|
||||
private static float MapLayerY(int lineLayer)
|
||||
{
|
||||
int layer = Mathf.Clamp(lineLayer, 0, 2);
|
||||
return (layer - VerticalCenter) * LayerSpacing;
|
||||
}
|
||||
|
||||
// Beat Saber cutDirection → VRBeats Direction
|
||||
// BS: 0=Up 1=Down 2=Left 3=Right 4=UpperLeft 5=UpperRight 6=LowerLeft 7=LowerRight 8=Any
|
||||
private static readonly Direction[] CutDirMap =
|
||||
|
||||
@@ -159,7 +159,7 @@ public class SongSelectManager : MonoBehaviour
|
||||
tTmp.color = Color.white;
|
||||
tTmp.alignment = TextAlignmentOptions.MidlineLeft;
|
||||
tTmp.overflowMode = TextOverflowModes.Overflow;
|
||||
tTmp.enableWordWrapping = false;
|
||||
tTmp.textWrappingMode = TextWrappingModes.NoWrap;
|
||||
titleGO.AddComponent<MarqueeText>();
|
||||
|
||||
// Artist
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace DamageSystem
|
||||
OnDamage.AddListener( ApplyImpactForce );
|
||||
}
|
||||
|
||||
private void ApplyImpactForce(DamageInfo info, DamageablePart damageable)
|
||||
protected override void ApplyImpactForce(DamageInfo info, DamageablePart damageable)
|
||||
{
|
||||
//if this AI if no dead it is being controlled by the Animator so dont apply any impact force
|
||||
if (!IsDead)
|
||||
@@ -28,4 +28,3 @@ namespace DamageSystem
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace VRSDK.Climbing
|
||||
{
|
||||
base.Start();
|
||||
|
||||
target = FindObjectOfType<ClimbingTarget>();
|
||||
target = FindFirstObjectByType<ClimbingTarget>();
|
||||
onGrabStateChange.AddListener( OnGrabStateChangeClimb );
|
||||
}
|
||||
|
||||
@@ -89,4 +89,3 @@ namespace VRSDK.Climbing
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Build;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -193,8 +194,8 @@ namespace VRSDK.EditorCode
|
||||
public static void ForceRebuild()
|
||||
{
|
||||
string[] rebuildSymbols = { "RebuildToggle1", "RebuildToggle2" };
|
||||
string definesString = PlayerSettings.GetScriptingDefineSymbolsForGroup(
|
||||
EditorUserBuildSettings.selectedBuildTargetGroup );
|
||||
NamedBuildTarget buildTarget = NamedBuildTarget.FromBuildTargetGroup(EditorUserBuildSettings.selectedBuildTargetGroup);
|
||||
string definesString = PlayerSettings.GetScriptingDefineSymbols(buildTarget);
|
||||
var definesStringTemp = definesString;
|
||||
if (definesStringTemp.Contains( rebuildSymbols[0] ))
|
||||
{
|
||||
@@ -208,14 +209,9 @@ namespace VRSDK.EditorCode
|
||||
{
|
||||
definesStringTemp += ";" + rebuildSymbols[0];
|
||||
}
|
||||
PlayerSettings.SetScriptingDefineSymbolsForGroup(
|
||||
EditorUserBuildSettings.selectedBuildTargetGroup,
|
||||
definesStringTemp );
|
||||
PlayerSettings.SetScriptingDefineSymbolsForGroup(
|
||||
EditorUserBuildSettings.selectedBuildTargetGroup,
|
||||
definesString );
|
||||
PlayerSettings.SetScriptingDefineSymbols(buildTarget, definesStringTemp);
|
||||
PlayerSettings.SetScriptingDefineSymbols(buildTarget, definesString);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -15,10 +15,6 @@ namespace VRSDK.EditorCode
|
||||
|
||||
private HandVisualizerTool targetScript = null;
|
||||
|
||||
private static string returnScenePath = null;
|
||||
private static Scene returnScene;
|
||||
private static bool inPreviewMode = false;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
/*
|
||||
@@ -95,4 +91,3 @@ namespace VRSDK.EditorCode
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
+4
-5
@@ -26,15 +26,15 @@ namespace VRSDK.EditorCode
|
||||
{
|
||||
|
||||
Scene originalScene = EditorSceneManager.GetActiveScene();
|
||||
originalScenePath = EditorApplication.currentScene;
|
||||
originalScenePath = originalScene.path;
|
||||
|
||||
Scene previewScene = EditorSceneManager.NewScene( NewSceneSetup.DefaultGameObjects, NewSceneMode.Additive );
|
||||
EditorSceneManager.MoveGameObjectToScene( clone, previewScene );
|
||||
|
||||
EditorSceneManager.UnloadSceneAsync( originalScene );
|
||||
previewModeEnable = true;
|
||||
inspectedGrabbable = GameObject.FindObjectOfType<VR_Grabbable>();
|
||||
activeController = GameObject.FindObjectOfType<VR_Controller>();
|
||||
inspectedGrabbable = GameObject.FindFirstObjectByType<VR_Grabbable>();
|
||||
activeController = GameObject.FindFirstObjectByType<VR_Controller>();
|
||||
|
||||
OverrideGrabAnimation();
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace VRSDK.EditorCode
|
||||
{
|
||||
handPreviewSave = new HandPreviewSave( inspectedGrabbable );
|
||||
ExitPreviewMode();
|
||||
GameObjectMarker marker = GameObject.FindObjectOfType<GameObjectMarker>();
|
||||
GameObjectMarker marker = GameObject.FindFirstObjectByType<GameObjectMarker>();
|
||||
handPreviewSave.LoadInto(marker.GetComponent<VR_Grabbable>());
|
||||
GameObject.DestroyImmediate(marker);
|
||||
}
|
||||
@@ -131,4 +131,3 @@ namespace VRSDK.EditorCode
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace VRSDK
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Player player = FindObjectOfType<Player>();
|
||||
Player player = FindFirstObjectByType<Player>();
|
||||
gameOverScreenFader = player.GameOverScreenFader;
|
||||
}
|
||||
|
||||
@@ -123,4 +123,3 @@ namespace VRSDK
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace VRSDK
|
||||
|
||||
private void Start()
|
||||
{
|
||||
characterController = FindObjectOfType<VR_CharacterController>();
|
||||
characterController = FindFirstObjectByType<VR_CharacterController>();
|
||||
|
||||
if (characterController != null)
|
||||
{
|
||||
@@ -25,7 +25,7 @@ namespace VRSDK
|
||||
|
||||
if (anchorPoint == null)
|
||||
{
|
||||
Player player = FindObjectOfType<Player>();
|
||||
Player player = FindFirstObjectByType<Player>();
|
||||
anchorPoint = player.PocketsAnchorPoint;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace VRSDK
|
||||
|
||||
private void SetTeleportCallback()
|
||||
{
|
||||
VR_TeleportHandler teleportHandler = FindObjectOfType<VR_TeleportHandler>();
|
||||
VR_TeleportHandler teleportHandler = FindFirstObjectByType<VR_TeleportHandler>();
|
||||
|
||||
if (teleportHandler != null)
|
||||
{
|
||||
@@ -102,4 +102,3 @@ namespace VRSDK
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Platinio
|
||||
{
|
||||
|
||||
//get all the singletones
|
||||
T[] singletons = GameObject.FindObjectsOfType( typeof(T) ) as T[];
|
||||
T[] singletons = FindObjectsByType<T>(FindObjectsSortMode.None);
|
||||
|
||||
if(singletons != null)
|
||||
{
|
||||
|
||||
@@ -18,10 +18,9 @@ namespace VRSDK
|
||||
{
|
||||
for (int n = 0; n < wallCubePartArray.Length; n++)
|
||||
{
|
||||
wallCubePartArray[n].Reset( resetTime );
|
||||
wallCubePartArray[n].ResetPart( resetTime );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace VRSDK
|
||||
rb = GetComponent<Rigidbody>();
|
||||
}
|
||||
|
||||
public void Reset(float t)
|
||||
public void ResetPart(float t)
|
||||
{
|
||||
rb.isKinematic = true;
|
||||
|
||||
@@ -64,4 +64,3 @@ namespace VRSDK
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace VRSDK
|
||||
public HandPhysics(HistoryBuffer buffer)
|
||||
{
|
||||
historyBuffer = buffer;
|
||||
characterController = MonoBehaviour.FindObjectOfType<VR_CharacterController>();
|
||||
characterController = MonoBehaviour.FindFirstObjectByType<VR_CharacterController>();
|
||||
|
||||
trackingSpace = VR_Manager.instance.Player.TrackingSpace;
|
||||
|
||||
@@ -148,4 +148,3 @@ namespace VRSDK
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,17 +95,17 @@ namespace VRSDK
|
||||
return GetAxis1D(button) > 0.25f;
|
||||
case VR_InputButton.Primary:
|
||||
#if UNITY_XR
|
||||
thisInputDevice.IsPressed(InputHelpers.Button.PrimaryButton, out value);
|
||||
thisInputDevice.TryGetFeatureValue(CommonUsages.primaryButton, out value);
|
||||
#endif
|
||||
break;
|
||||
case VR_InputButton.Secondary:
|
||||
#if UNITY_XR
|
||||
thisInputDevice.IsPressed(InputHelpers.Button.SecondaryButton, out value);
|
||||
thisInputDevice.TryGetFeatureValue(CommonUsages.secondaryButton, out value);
|
||||
#endif
|
||||
break;
|
||||
case VR_InputButton.TumbstickPress:
|
||||
#if UNITY_XR
|
||||
thisInputDevice.IsPressed(InputHelpers.Button.Primary2DAxisClick, out value);
|
||||
thisInputDevice.TryGetFeatureValue(CommonUsages.primary2DAxisClick, out value);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@@ -158,4 +158,3 @@ namespace VRSDK
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
using UnityEngine;
|
||||
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace VRSDK.Locomotion
|
||||
{
|
||||
//this scripts handles aim marker position and rotation
|
||||
public class VR_AimMarker : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private GameObject marker = null;
|
||||
[SerializeField] private BoxCollider collider = null;
|
||||
[FormerlySerializedAs("collider")]
|
||||
[SerializeField] private BoxCollider markerCollider = null;
|
||||
[SerializeField] private float slopeLimit;
|
||||
|
||||
public GameObject Marker { get { return marker; } }
|
||||
public BoxCollider Collider { get { return collider; } }
|
||||
public BoxCollider Collider { get { return markerCollider; } }
|
||||
public float SlopeLimit { get { return slopeLimit; } }
|
||||
|
||||
private void Awake()
|
||||
@@ -52,4 +55,3 @@ namespace VRSDK.Locomotion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -88,11 +88,13 @@ namespace VRSDK
|
||||
[NonSerialized]
|
||||
public float CameraHeight;
|
||||
|
||||
#if SDK_OCULUS
|
||||
/// <summary>
|
||||
/// This event is raised after the character controller is moved. This is used by the OVRAvatarLocomotion script to keep the avatar transform synchronized
|
||||
/// with the OVRPlayerController.
|
||||
/// </summary>
|
||||
public event Action<Transform> TransformUpdated;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// This bool is set to true whenever the player controller has been teleported. It is reset after every frame. Some systems, such as
|
||||
@@ -177,7 +179,9 @@ namespace VRSDK
|
||||
private float SimulationRate = 60f;
|
||||
private float buttonRotation = 0f;
|
||||
private bool ReadyToSnapTurn; // Set to true when a snap turn has occurred, code requires one frame of centered thumbstick to enable another snap turn.
|
||||
#if SDK_OCULUS
|
||||
private bool playerControllerEnabled = false;
|
||||
#endif
|
||||
private float moveInfluence = 0.0f;
|
||||
public Vector3 lastPosition = Vector3.zero;
|
||||
private Vector3 velocity = Vector3.zero;
|
||||
@@ -409,8 +413,6 @@ namespace VRSDK
|
||||
moveRight = Input.GetKey(KeyCode.D) || Input.GetKey(KeyCode.RightArrow);
|
||||
moveBack = Input.GetKey(KeyCode.S) || Input.GetKey(KeyCode.DownArrow);
|
||||
#endif
|
||||
bool dpad_move = false;
|
||||
|
||||
MoveScale = 1.0f;
|
||||
|
||||
if ((moveForward && moveLeft) || (moveForward && moveRight) || (moveBack && moveLeft) || (moveBack && moveRight))
|
||||
@@ -427,6 +429,7 @@ namespace VRSDK
|
||||
|
||||
// Run!
|
||||
#if !UNITY_XR
|
||||
bool dpad_move = false;
|
||||
if (dpad_move || Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))
|
||||
moveInfluence *= 2.0f;
|
||||
#endif
|
||||
@@ -713,4 +716,3 @@ namespace VRSDK
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace VRSDK
|
||||
|
||||
private void FindOrCreate_VR_Manager()
|
||||
{
|
||||
if (FindObjectOfType<VR_Manager>() == null)
|
||||
if (FindFirstObjectByType<VR_Manager>() == null)
|
||||
{
|
||||
Debug.LogError("you need a VR_Manager active in the scene in order to use VR Shooter Kit");
|
||||
}
|
||||
@@ -630,4 +630,3 @@ namespace VRSDK
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,6 @@ namespace VRSDK
|
||||
{
|
||||
private float minAcelerationThreshold = 0.0f;
|
||||
private float maxAcelerationThreshold = 0.0f;
|
||||
private int sampleCount = 0;
|
||||
|
||||
private VR_Controller controller = null;
|
||||
private GesturePhase rotationGesturePhase = GesturePhase.Tracking;
|
||||
private Quaternion rotationGesturefromQuaternion = Quaternion.identity;
|
||||
@@ -128,4 +126,3 @@ namespace VRSDK
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -55,8 +55,6 @@ namespace VRSDK
|
||||
protected bool preventDefault = false;
|
||||
protected float velocityChangeThreshold = 10f;
|
||||
protected float angularVelocityChangeThreshold = 20f;
|
||||
private bool previousUseGravityState = false;
|
||||
private bool previousGravityState = false;
|
||||
private VR_Controller lastInteractController = null;
|
||||
private bool objectWasThrow = false;
|
||||
protected bool canUseDropZone = true;
|
||||
@@ -766,4 +764,4 @@ namespace VRSDK
|
||||
onGrabStateChange.RemoveAllListeners();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace VRSDK
|
||||
|
||||
#region PUBLIC
|
||||
public VR_SDK CurrentSDK { get { return currentSDK; } }
|
||||
public ControllerGestureConfig GestureConfig { get { return gestureConfig; } }
|
||||
public List<VR_Interactable> InteractList { get { return interactList; } }
|
||||
public List<VR_Highlight> HighlightList { get { return highlightList; } }
|
||||
public List<VR_Grabbable> GrabbableList { get { return grabbableList; } }
|
||||
@@ -43,7 +44,7 @@ namespace VRSDK
|
||||
{
|
||||
if (player == null)
|
||||
{
|
||||
player = FindObjectOfType<VR_Player>();
|
||||
player = FindFirstObjectByType<VR_Player>();
|
||||
player.Construct();
|
||||
}
|
||||
|
||||
@@ -140,4 +141,3 @@ namespace VRSDK
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace VRSDK
|
||||
{
|
||||
get
|
||||
{
|
||||
return FindObjectOfType<CharacterController>();
|
||||
return FindFirstObjectByType<CharacterController>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,4 +109,3 @@ namespace VRSDK
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace VRSDK
|
||||
|
||||
public float SpeedModifier { get { return speedModifier; } }
|
||||
public float AngularSpeedModifier { get { return aungularSpeedModifier; } }
|
||||
bool throwed = false;
|
||||
private void Awake()
|
||||
{
|
||||
|
||||
@@ -39,4 +38,3 @@ namespace VRSDK
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ namespace VRBeats
|
||||
{
|
||||
[SerializeField] private float minCutSpeed = 0.5f;
|
||||
[SerializeField] private float maxCutAngle = 40f;
|
||||
[SerializeField] private OnSliceAction sliceAction = null;
|
||||
[SerializeField] private GameEvent onCorrectSlice = null;
|
||||
[SerializeField] private GameEvent onIncorrectSlice = null;
|
||||
[SerializeField] private GameEvent onPlayerMiss = null;
|
||||
@@ -112,4 +111,3 @@ namespace VRBeats
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,6 @@ namespace VRBeats
|
||||
[SerializeField] private BoxCollider playZone = null;
|
||||
[SerializeField] private Transform player = null;
|
||||
[SerializeField] private VR_BeatSettings settings = null;
|
||||
[SerializeField] private GameEvent onGameOver = null;
|
||||
|
||||
private AudioManager audioManager = null;
|
||||
private EnviromentController enviromentController = null;
|
||||
private PlayableDirector playableDirector = null;
|
||||
@@ -24,20 +22,17 @@ namespace VRBeats
|
||||
|
||||
public Transform Player { get { return player; } }
|
||||
|
||||
private int playerConsecutiveMiss = 0;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
audioManager = FindObjectOfType<AudioManager>();
|
||||
enviromentController = FindObjectOfType<EnviromentController>();
|
||||
playableDirector = FindObjectOfType<PlayableDirector>();
|
||||
audioManager = FindFirstObjectByType<AudioManager>();
|
||||
enviromentController = FindFirstObjectByType<EnviromentController>();
|
||||
playableDirector = FindFirstObjectByType<PlayableDirector>();
|
||||
}
|
||||
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
playerConsecutiveMiss = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -18,7 +18,8 @@ namespace VRBeats
|
||||
|
||||
private void Rotate()
|
||||
{
|
||||
float rotation = Random.Range(-maxRotation , maxRotation);
|
||||
float direction = Random.value < 0.5f ? -1.0f : 1.0f;
|
||||
float rotation = Random.Range(minRotation, maxRotation) * direction;
|
||||
transform.RotateTween( Vector3.forward , rotation , animTime).SetEase(ease).SetOnComplete( Rotate );
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace VRBeats
|
||||
}
|
||||
else
|
||||
{
|
||||
VolumeSingleton[] instancesArray = FindObjectsOfType<VolumeSingleton>();
|
||||
VolumeSingleton[] instancesArray = FindObjectsByType<VolumeSingleton>(FindObjectsSortMode.None);
|
||||
|
||||
foreach (var volumeSingleton in instancesArray)
|
||||
{
|
||||
@@ -30,4 +30,3 @@ namespace VRBeats
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace Platinio.UI
|
||||
Canvas canvas = null;
|
||||
|
||||
//just return the first encounter canvas
|
||||
canvas = GameObject.FindObjectOfType<Canvas>();
|
||||
canvas = GameObject.FindFirstObjectByType<Canvas>();
|
||||
|
||||
if (canvas != null)
|
||||
{
|
||||
@@ -144,4 +144,3 @@ namespace Platinio.UI
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace VRBeats
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
enviromentController = FindObjectOfType<EnviromentController>();
|
||||
enviromentController = FindFirstObjectByType<EnviromentController>();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace VRBeats
|
||||
initialValue += "0";
|
||||
}
|
||||
|
||||
scoreManager = FindObjectOfType<ScoreManager>();
|
||||
scoreManager = FindFirstObjectByType<ScoreManager>();
|
||||
|
||||
}
|
||||
|
||||
@@ -58,4 +58,3 @@ namespace VRBeats
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user