Skip to content

Commit

Permalink
refactor: Rename global sound player
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Aug 12, 2023
1 parent 3cdbb74 commit b9b5fab
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 247 deletions.
123 changes: 8 additions & 115 deletions Assets/JCSUnity/Resources/JCS_Webcam.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
129 changes: 17 additions & 112 deletions Assets/JCSUnity/Resources/UI/JCS_TweenPanel.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: []
Expand Down Expand Up @@ -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
Expand All @@ -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}
Expand Down Expand Up @@ -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: []
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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: []
Expand Down Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion Assets/JCSUnity/Scripts/Actions/2D/AI/JCS_2DDeadAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/// <summary>
Expand Down
Loading

0 comments on commit b9b5fab

Please sign in to comment.