station 46 audio and animation

This commit is contained in:
2023-05-14 21:22:58 +02:00
parent 48742e7d14
commit 8de8301205
24 changed files with 2072 additions and 32 deletions

View File

@@ -1,6 +1,4 @@
using System;
using System.Linq;
using EscapeRoomEngine.VR.Runtime;
using System.Linq;
using NaughtyAttributes;
using UnityEngine;
@@ -22,7 +20,7 @@ namespace Station46.Environments.Intro_Sphere.Scripts
[BoxGroup("Internal")] [SerializeField] private MeshRenderer sphereRenderer;
private float[] _audioSamples;
private float[] _samplesAverage = new float[AverageLength];
private readonly float[] _samplesAverage = new float[AverageLength];
private int averageIndex;
private float _initialBrightness;
private Material _sphereMaterial;
@@ -37,7 +35,6 @@ namespace Station46.Environments.Intro_Sphere.Scripts
_sphereMaterial = sphereRenderer.material;
_initialBrightness = _sphereMaterial.GetFloat(FresnelPower);
_rigidbody = GetComponent<Rigidbody>();
target = Player.Instance.sphereFollow;
}
private void FixedUpdate()