diff --git a/Assets/scenes/GameplayScene.unity b/Assets/scenes/GameplayScene.unity index 7754e4b..7e408b2 100644 --- a/Assets/scenes/GameplayScene.unity +++ b/Assets/scenes/GameplayScene.unity @@ -2396,7 +2396,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 10833872, guid: 09a2e2e70f49c4330831bd4f733bbdb4, type: 2} propertyPath: m_Range - value: 252.96521 + value: 265.97876 objectReference: {fileID: 0} - target: {fileID: 169668, guid: 09a2e2e70f49c4330831bd4f733bbdb4, type: 2} propertyPath: m_Name @@ -2410,6 +2410,10 @@ Prefab: propertyPath: m_Name value: Spotlight_blue (right) objectReference: {fileID: 0} + - target: {fileID: 437796, guid: 09a2e2e70f49c4330831bd4f733bbdb4, type: 2} + propertyPath: m_LocalPosition.y + value: -2.32999992 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 09a2e2e70f49c4330831bd4f733bbdb4, type: 2} m_IsPrefabParent: 0 diff --git a/Assets/scripts/LevelManager.cs b/Assets/scripts/LevelManager.cs index 3d2cd03..9c58728 100644 --- a/Assets/scripts/LevelManager.cs +++ b/Assets/scripts/LevelManager.cs @@ -21,6 +21,7 @@ public class LevelManager : MonoBehaviour { private SelectorWithBolts Selector; private GameObject PhysicsContainer; + private int playerId; // Use this for initialization void Start() @@ -83,9 +84,11 @@ public class LevelManager : MonoBehaviour { { if (player.hasNextLetter(letterNum)) { - tile.symbol.color = PlayerColors[player.num - 1]; - StartCoroutine(MoveSelectorToTile(tile)); + playerId = player.num - 1; + tile.symbol.color = PlayerColors[playerId]; + StartCoroutine(MoveSelectorToTile(tile)); + SoundManager.Instance.PlayRunePickup(); //Do something @@ -154,7 +157,7 @@ public class LevelManager : MonoBehaviour { Vector3 endPos = cameraTrans.position + cameraTrans.forward * 10f;//trans.position + new Vector3(0f, 5f, 0f); Quaternion endRot = Quaternion.LookRotation(cameraTrans.forward); - ratio += Time.deltaTime / 2f; + ratio += Time.deltaTime / 1.5f; trans.position = Vector3.Lerp(startPos, endPos, ratio); trans.rotation = Quaternion.Slerp(startRot, endRot, ratio); @@ -179,9 +182,11 @@ public class LevelManager : MonoBehaviour { float ratio = 0f; while (ratio < 1f) { - ratio += Time.deltaTime / 0.5f; + ratio += Time.deltaTime / 1f; - Vector3 endPos = Camera.main.ViewportToWorldPoint(new Vector3(0.9f, 0.9f, Camera.main.nearClipPlane + 0.1f)); + float viewportX = 0.2f + playerId * 0.3f; + + Vector3 endPos = Camera.main.ViewportToWorldPoint(new Vector3(viewportX, 0.8f, Camera.main.nearClipPlane + 0.1f)); trans.position = Vector3.Lerp(startPos, endPos, ratio); trans.localScale = Vector3.Lerp(startScale, endScale, ratio); diff --git a/Assets/scripts/SelectorWithBolts.cs b/Assets/scripts/SelectorWithBolts.cs index 2ebed57..527e602 100644 --- a/Assets/scripts/SelectorWithBolts.cs +++ b/Assets/scripts/SelectorWithBolts.cs @@ -31,7 +31,7 @@ public class SelectorWithBolts : MonoBehaviour playerCylinders[i] = Ropes[i].GetComponent().GetComponentsInChildren(); } - sm = SoundManager.Instance; + } void Start() @@ -40,6 +40,8 @@ public class SelectorWithBolts : MonoBehaviour { ReplenishPlayerDashMeter(i); } + + sm = SoundManager.Instance; } void Update() diff --git a/Assets/scripts/SoundManager.cs b/Assets/scripts/SoundManager.cs index dbfef36..27e6986 100644 --- a/Assets/scripts/SoundManager.cs +++ b/Assets/scripts/SoundManager.cs @@ -53,9 +53,9 @@ public class SoundManager : MonoBehaviour } } - public void UpdateScrappingVolume( float volume) + public void UpdateScrappingVolume( float newVolume) { - Scrapping.volume = volume; + Scrapping.volume = Mathf.Lerp(Scrapping.volume, newVolume, Time.deltaTime); }