From b9b5fab4862d804d59024af0b47e953bd2d0dafd Mon Sep 17 00:00:00 2001 From: JenChieh Date: Sat, 12 Aug 2023 14:05:38 -0700 Subject: [PATCH] refactor: Rename global sound player --- Assets/JCSUnity/Resources/JCS_Webcam.prefab | 123 ++--------------- .../Resources/UI/JCS_TweenPanel.prefab | 129 +++--------------- .../Scripts/Actions/2D/AI/JCS_2DDeadAction.cs | 2 +- .../2D/JCS_SimpleInvincibleTimeAction.cs | 2 +- .../Actions/JCS_InvincibleTimeAction.cs | 2 +- .../JCSUnity/Scripts/Effects/Item/JCS_Item.cs | 2 +- .../Scripts/Effects/Item/JCS_ItemDroppable.cs | 2 +- .../Scripts/Effects/JCS_ButtonSoundEffect.cs | 2 +- .../2D/2DCamera/JCS_2DSlideScreenCamera.cs | 2 +- .../JCS_ButtonSelectionGroupController.cs | 14 +- .../Scripts/Managers/JCS_SoundManager.cs | 2 +- .../JCSUnity/Scripts/Sound/JCS_SoundPlayer.cs | 2 +- .../Scripts/UI/Dialogue/JCS_DialogueSystem.cs | 4 +- .../Scripts/UI/Timer/JCS_SpriteTimer.cs | 2 +- .../Scripts/UI/Timer/JCS_TextTimer.cs | 2 +- docs/ScriptReference/Webcam/JCS_Webcam.md | 1 + 16 files changed, 46 insertions(+), 247 deletions(-) diff --git a/Assets/JCSUnity/Resources/JCS_Webcam.prefab b/Assets/JCSUnity/Resources/JCS_Webcam.prefab index 717e14607..ff3f467b6 100644 --- a/Assets/JCSUnity/Resources/JCS_Webcam.prefab +++ b/Assets/JCSUnity/Resources/JCS_Webcam.prefab @@ -12,8 +12,6 @@ GameObject: - component: {fileID: 3304952} - component: {fileID: 2399024} - component: {fileID: 11417402} - - component: {fileID: 134284150} - - component: {fileID: 134284149} m_Layer: 0 m_Name: JCS_Webcam m_TagString: Untagged @@ -31,6 +29,7 @@ Transform: m_LocalRotation: {x: -0.7069834, y: 0, z: 0, w: 0.7072302} m_LocalPosition: {x: 0, y: 0, z: 115.8} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -54,10 +53,12 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -82,6 +83,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!114 &11417402 MonoBehaviour: m_ObjectHideFlags: 0 @@ -95,121 +97,12 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: mObjectType: 0 - mWebcamWidth: 0 - mWebcamHeight: 0 + mManuallySetSize: 0 + mMustBeFullScreen: 0 + mFPS: 12 mResumeTime: 0 + mDeltaTimeType: 0 mSplash: 1 mDelayTime: 1 mTakePicKey: 0 - mSavePath: /JCS_GameData/WebcamShot/ - mSaveExtension: .png mTakePhotoSound: {fileID: 0} ---- !u!82 &134284150 -AudioSource: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 123352} - m_Enabled: 1 - serializedVersion: 4 - OutputAudioMixerGroup: {fileID: 0} - m_audioClip: {fileID: 0} - m_PlayOnAwake: 1 - m_Volume: 1 - m_Pitch: 1 - Loop: 0 - Mute: 0 - Spatialize: 0 - SpatializePostEffects: 0 - Priority: 128 - DopplerLevel: 1 - MinDistance: 1 - MaxDistance: 500 - Pan2D: 0 - rolloffMode: 0 - BypassEffects: 0 - BypassListenerEffects: 0 - BypassReverbZones: 0 - rolloffCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - panLevelCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 0 - spreadCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - reverbZoneMixCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 0 ---- !u!114 &134284149 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 123352} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fbfbfab4c3b19c642ac2df0576c95e0f, type: 3} - m_Name: - m_EditorClassIdentifier: - mSoundSettingType: 0 diff --git a/Assets/JCSUnity/Resources/UI/JCS_TweenPanel.prefab b/Assets/JCSUnity/Resources/UI/JCS_TweenPanel.prefab index b3664ff9b..aa11f81da 100644 --- a/Assets/JCSUnity/Resources/UI/JCS_TweenPanel.prefab +++ b/Assets/JCSUnity/Resources/UI/JCS_TweenPanel.prefab @@ -28,6 +28,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 224578551225685524} m_RootOrder: 0 @@ -60,6 +61,8 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -91,8 +94,6 @@ GameObject: - component: {fileID: 114304603041978312} - component: {fileID: -161361591436516535} - component: {fileID: 114033109570745038} - - component: {fileID: 82760082251195884} - - component: {fileID: 114903964410367410} m_Layer: 5 m_Name: JCS_TweenPanel m_TagString: Untagged @@ -110,6 +111,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 224578551225685524} m_Father: {fileID: 0} @@ -143,6 +145,8 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0.89705884, g: 0.5606618, b: 0.85993916, a: 0.716} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -177,12 +181,16 @@ MonoBehaviour: mContinueKeyTween: 99 mContinueTween: 0 mTargetTransform: {fileID: 0} + mDoneTweenX: 1 + mDoneTweenY: 1 + mDoneTweenZ: 1 mIsDoneTweening: 0 mTween: 1 mValueOffset: {x: 0, y: 0, z: 0} mDurationX: 1 mDurationY: 1 mDurationZ: 1 + mDeltaTimeType: 0 mDestroyWhenDoneTweening: 0 mDestroyDoneTweeningCount: 1 mRandomizeDuration: 0 @@ -226,118 +234,11 @@ MonoBehaviour: mActiveKey: 107 mDeactiveKey: 108 mIsActive: 0 - mTweenerHandler: {fileID: 0} + mPanelRoot: {fileID: 0} + mOverrideTween: 0 + mSoundPlayer: {fileID: 0} mActiveSound: {fileID: 0} mDeactiveSound: {fileID: 0} ---- !u!82 &82760082251195884 -AudioSource: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1299254873998570} - m_Enabled: 1 - serializedVersion: 4 - OutputAudioMixerGroup: {fileID: 0} - m_audioClip: {fileID: 0} - m_PlayOnAwake: 1 - m_Volume: 1 - m_Pitch: 1 - Loop: 0 - Mute: 0 - Spatialize: 0 - SpatializePostEffects: 0 - Priority: 128 - DopplerLevel: 1 - MinDistance: 1 - MaxDistance: 500 - Pan2D: 0 - rolloffMode: 0 - BypassEffects: 0 - BypassListenerEffects: 0 - BypassReverbZones: 0 - rolloffCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - panLevelCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 0 - spreadCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - reverbZoneMixCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 0 ---- !u!114 &114903964410367410 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1299254873998570} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fbfbfab4c3b19c642ac2df0576c95e0f, type: 3} - m_Name: - m_EditorClassIdentifier: - mSoundSettingType: 2 --- !u!1 &1539219360129374 GameObject: m_ObjectHideFlags: 0 @@ -367,6 +268,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 224098785599545258} m_Father: {fileID: 224566559658305944} @@ -400,6 +302,8 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -427,6 +331,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 + m_WrapAround: 0 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} diff --git a/Assets/JCSUnity/Scripts/Actions/2D/AI/JCS_2DDeadAction.cs b/Assets/JCSUnity/Scripts/Actions/2D/AI/JCS_2DDeadAction.cs index 33f4af3a8..0ee518962 100644 --- a/Assets/JCSUnity/Scripts/Actions/2D/AI/JCS_2DDeadAction.cs +++ b/Assets/JCSUnity/Scripts/Actions/2D/AI/JCS_2DDeadAction.cs @@ -72,7 +72,7 @@ private void Update() if (!mSoundPlayed) { // just play one time. - JCS_SoundManager.instance.GetGlobalSoundPlayer().PlayOneShot(mDieSound); + JCS_SoundManager.instance.GlobalSoundPlayer().PlayOneShot(mDieSound); mSoundPlayed = true; } diff --git a/Assets/JCSUnity/Scripts/Actions/2D/JCS_SimpleInvincibleTimeAction.cs b/Assets/JCSUnity/Scripts/Actions/2D/JCS_SimpleInvincibleTimeAction.cs index 38652d082..5d1b2675f 100644 --- a/Assets/JCSUnity/Scripts/Actions/2D/JCS_SimpleInvincibleTimeAction.cs +++ b/Assets/JCSUnity/Scripts/Actions/2D/JCS_SimpleInvincibleTimeAction.cs @@ -162,7 +162,7 @@ public void TriggerAction(float time) mTriggerAction = true; // play the sound once. - JCS_SoundManager.instance.GetGlobalSoundPlayer().PlayOneShot(mTriggerSound); + JCS_SoundManager.instance.GlobalSoundPlayer().PlayOneShot(mTriggerSound); } /// diff --git a/Assets/JCSUnity/Scripts/Actions/JCS_InvincibleTimeAction.cs b/Assets/JCSUnity/Scripts/Actions/JCS_InvincibleTimeAction.cs index eb83218ea..69c812fd4 100644 --- a/Assets/JCSUnity/Scripts/Actions/JCS_InvincibleTimeAction.cs +++ b/Assets/JCSUnity/Scripts/Actions/JCS_InvincibleTimeAction.cs @@ -161,7 +161,7 @@ public void TriggerAction(float time) mTriggerAction = true; // play the sound once. - JCS_SoundManager.instance.GetGlobalSoundPlayer().PlayOneShot(mTriggerSound); + JCS_SoundManager.instance.GlobalSoundPlayer().PlayOneShot(mTriggerSound); } /// diff --git a/Assets/JCSUnity/Scripts/Effects/Item/JCS_Item.cs b/Assets/JCSUnity/Scripts/Effects/Item/JCS_Item.cs index 913480f63..d0fa7bb50 100644 --- a/Assets/JCSUnity/Scripts/Effects/Item/JCS_Item.cs +++ b/Assets/JCSUnity/Scripts/Effects/Item/JCS_Item.cs @@ -205,7 +205,7 @@ private void DoPick(Collider other) { DropEffect(other); - JCS_SoundPlayer sp = JCS_SoundManager.instance.GetGlobalSoundPlayer(); + JCS_SoundPlayer sp = JCS_SoundManager.instance.GlobalSoundPlayer(); /* Play Pick Sound */ if (mPlayOneShotWhileNotPlayingForPickSound) diff --git a/Assets/JCSUnity/Scripts/Effects/Item/JCS_ItemDroppable.cs b/Assets/JCSUnity/Scripts/Effects/Item/JCS_ItemDroppable.cs index f26e4ea38..ada109c30 100644 --- a/Assets/JCSUnity/Scripts/Effects/Item/JCS_ItemDroppable.cs +++ b/Assets/JCSUnity/Scripts/Effects/Item/JCS_ItemDroppable.cs @@ -525,7 +525,7 @@ private void PlayDropSound() if (mDropSound == null) return; - JCS_SoundManager.instance.GetGlobalSoundPlayer().PlayOneShot(mDropSound); + JCS_SoundManager.instance.GlobalSoundPlayer().PlayOneShot(mDropSound); } } } diff --git a/Assets/JCSUnity/Scripts/Effects/JCS_ButtonSoundEffect.cs b/Assets/JCSUnity/Scripts/Effects/JCS_ButtonSoundEffect.cs index 1a0eee024..d9aec7245 100644 --- a/Assets/JCSUnity/Scripts/Effects/JCS_ButtonSoundEffect.cs +++ b/Assets/JCSUnity/Scripts/Effects/JCS_ButtonSoundEffect.cs @@ -156,7 +156,7 @@ private void Start() * player. */ if (mSoundPlayer == null) - mSoundPlayer = JCS_SoundManager.instance.GetGlobalSoundPlayer(); + mSoundPlayer = JCS_SoundManager.instance.GlobalSoundPlayer(); if (mAutoAddEvent) { diff --git a/Assets/JCSUnity/Scripts/GameObject/2D/2DCamera/JCS_2DSlideScreenCamera.cs b/Assets/JCSUnity/Scripts/GameObject/2D/2DCamera/JCS_2DSlideScreenCamera.cs index 3406f4ae9..84710aa77 100644 --- a/Assets/JCSUnity/Scripts/GameObject/2D/2DCamera/JCS_2DSlideScreenCamera.cs +++ b/Assets/JCSUnity/Scripts/GameObject/2D/2DCamera/JCS_2DSlideScreenCamera.cs @@ -444,7 +444,7 @@ private void DoMobileSwipe() /// private void PlaySwitchSceneSound() { - JCS_SoundPlayer sp = JCS_SoundManager.instance.GetGlobalSoundPlayer(); + JCS_SoundPlayer sp = JCS_SoundManager.instance.GlobalSoundPlayer(); sp.PlayOneShot(this.mSwitchSceneSound); } diff --git a/Assets/JCSUnity/Scripts/Input/JCS_ButtonSelectionGroupController.cs b/Assets/JCSUnity/Scripts/Input/JCS_ButtonSelectionGroupController.cs index be14e41a9..8704b2385 100644 --- a/Assets/JCSUnity/Scripts/Input/JCS_ButtonSelectionGroupController.cs +++ b/Assets/JCSUnity/Scripts/Input/JCS_ButtonSelectionGroupController.cs @@ -338,7 +338,7 @@ private void PlayNextSound() { if (mNextSound == null) return; - JCS_SoundPlayer sp = JCS_SoundManager.instance.GetGlobalSoundPlayer(); + JCS_SoundPlayer sp = JCS_SoundManager.instance.GlobalSoundPlayer(); sp.PlayOneShotByMethod(mNextSound, mNextSoundMethod); } @@ -347,7 +347,7 @@ private void PlayPrevSound() { if (mPrevSound == null) return; - JCS_SoundPlayer sp = JCS_SoundManager.instance.GetGlobalSoundPlayer(); + JCS_SoundPlayer sp = JCS_SoundManager.instance.GlobalSoundPlayer(); sp.PlayOneShotByMethod(mPrevSound, mPrevSoundMethod); } @@ -356,7 +356,7 @@ private void PlayOkaySound() { if (mOkaySound == null) return; - JCS_SoundPlayer sp = JCS_SoundManager.instance.GetGlobalSoundPlayer(); + JCS_SoundPlayer sp = JCS_SoundManager.instance.GlobalSoundPlayer(); sp.PlayOneShotByMethod(mOkaySound, mOkaySoundMethod); } @@ -365,7 +365,7 @@ private void PlayUpSound() { if (mUpSound == null) return; - JCS_SoundPlayer sp = JCS_SoundManager.instance.GetGlobalSoundPlayer(); + JCS_SoundPlayer sp = JCS_SoundManager.instance.GlobalSoundPlayer(); sp.PlayOneShotByMethod(mUpSound, mUpSoundMethod); } @@ -374,7 +374,7 @@ private void PlayDownSound() { if (mDownSound == null) return; - JCS_SoundPlayer sp = JCS_SoundManager.instance.GetGlobalSoundPlayer(); + JCS_SoundPlayer sp = JCS_SoundManager.instance.GlobalSoundPlayer(); sp.PlayOneShotByMethod(mDownSound, mDownSoundMethod); } @@ -383,7 +383,7 @@ private void PlayRightSound() { if (mRightSound == null) return; - JCS_SoundPlayer sp = JCS_SoundManager.instance.GetGlobalSoundPlayer(); + JCS_SoundPlayer sp = JCS_SoundManager.instance.GlobalSoundPlayer(); sp.PlayOneShotByMethod(mRightSound, mRightSoundMethod); } @@ -392,7 +392,7 @@ private void PlayLeftSound() { if (mLeftSound == null) return; - JCS_SoundPlayer sp = JCS_SoundManager.instance.GetGlobalSoundPlayer(); + JCS_SoundPlayer sp = JCS_SoundManager.instance.GlobalSoundPlayer(); sp.PlayOneShotByMethod(mLeftSound, mLeftSoundMethod); } } diff --git a/Assets/JCSUnity/Scripts/Managers/JCS_SoundManager.cs b/Assets/JCSUnity/Scripts/Managers/JCS_SoundManager.cs index 7b0e6502a..2d89c9f56 100644 --- a/Assets/JCSUnity/Scripts/Managers/JCS_SoundManager.cs +++ b/Assets/JCSUnity/Scripts/Managers/JCS_SoundManager.cs @@ -101,7 +101,7 @@ public void SetBackgroundMusic(AudioSource music) this.mBGM.mute = ss.BGM_MUTE; } public JCS_Vector GetEffectSounds() { return this.mSFXSounds; } - public JCS_SoundPlayer GetGlobalSoundPlayer() { return this.mGlobalSoundPlayer; } + public JCS_SoundPlayer GlobalSoundPlayer() { return this.mGlobalSoundPlayer; } public bool OverrideSetting { get { return this.mOverrideSetting; } } public float SoundFadeInTime { get { return this.mSoundFadeInTime; } set { this.mSoundFadeInTime = value; } } diff --git a/Assets/JCSUnity/Scripts/Sound/JCS_SoundPlayer.cs b/Assets/JCSUnity/Scripts/Sound/JCS_SoundPlayer.cs index e144a9f8a..702d940b1 100644 --- a/Assets/JCSUnity/Scripts/Sound/JCS_SoundPlayer.cs +++ b/Assets/JCSUnity/Scripts/Sound/JCS_SoundPlayer.cs @@ -62,7 +62,7 @@ public static void PlayByAttachment(JCS_SoundPlayer player, AudioClip clip, JCS_ { JCS_SoundPlayer useSp = player; if (useSp == null) - useSp = JCS_SoundManager.instance.GetGlobalSoundPlayer(); + useSp = JCS_SoundManager.instance.GlobalSoundPlayer(); useSp.PlayOneShotByMethod(clip, method, volume); } diff --git a/Assets/JCSUnity/Scripts/UI/Dialogue/JCS_DialogueSystem.cs b/Assets/JCSUnity/Scripts/UI/Dialogue/JCS_DialogueSystem.cs index eae8cc2f7..f194824ad 100644 --- a/Assets/JCSUnity/Scripts/UI/Dialogue/JCS_DialogueSystem.cs +++ b/Assets/JCSUnity/Scripts/UI/Dialogue/JCS_DialogueSystem.cs @@ -261,7 +261,7 @@ public void ActiveDialogue(JCS_DialogueScript script) RunAction(); // Play the active dialogue sound. - JCS_SoundManager.instance.GetGlobalSoundPlayer().PlayOneShot(mActiveSound); + JCS_SoundManager.instance.GlobalSoundPlayer().PlayOneShot(mActiveSound); } /// @@ -500,7 +500,7 @@ public void Dispose() callback_dispose.Invoke(); // Play the dispose dialogue sound. - JCS_SoundManager.instance.GetGlobalSoundPlayer().PlayOneShot(mDisposeSound); + JCS_SoundManager.instance.GlobalSoundPlayer().PlayOneShot(mDisposeSound); } /// diff --git a/Assets/JCSUnity/Scripts/UI/Timer/JCS_SpriteTimer.cs b/Assets/JCSUnity/Scripts/UI/Timer/JCS_SpriteTimer.cs index 33734718c..3606b4e5c 100644 --- a/Assets/JCSUnity/Scripts/UI/Timer/JCS_SpriteTimer.cs +++ b/Assets/JCSUnity/Scripts/UI/Timer/JCS_SpriteTimer.cs @@ -564,7 +564,7 @@ private void PlayTimerSound(AudioClip clip) return; JCS_SoundManager sm = JCS_SoundManager.instance; - sm.GetGlobalSoundPlayer().PlayOneShot(clip); + sm.GlobalSoundPlayer().PlayOneShot(clip); } } } diff --git a/Assets/JCSUnity/Scripts/UI/Timer/JCS_TextTimer.cs b/Assets/JCSUnity/Scripts/UI/Timer/JCS_TextTimer.cs index e08edcd06..65bccf1d1 100644 --- a/Assets/JCSUnity/Scripts/UI/Timer/JCS_TextTimer.cs +++ b/Assets/JCSUnity/Scripts/UI/Timer/JCS_TextTimer.cs @@ -387,7 +387,7 @@ private void PlayTimerSound(AudioClip clip) return; JCS_SoundManager sm = JCS_SoundManager.instance; - sm.GetGlobalSoundPlayer().PlayOneShot(clip); + sm.GlobalSoundPlayer().PlayOneShot(clip); } } } diff --git a/docs/ScriptReference/Webcam/JCS_Webcam.md b/docs/ScriptReference/Webcam/JCS_Webcam.md index 72db3a65d..59609c9dc 100644 --- a/docs/ScriptReference/Webcam/JCS_Webcam.md +++ b/docs/ScriptReference/Webcam/JCS_Webcam.md @@ -13,6 +13,7 @@ Basic webcam class usage. | mDeltaTimeType | Type of the delta time. | | DelayTime | Delay time to fade out the splash screen. | | TakePicKey | Key to take webcam image. | +| mSoundPlayer | Sound player for this component. | | TakePhotoSound | Sound when taking the screenshot. | | isPlaying | Flag to check if current webcam active. |