Skip to content

Commit dfd9b6e

Browse files
committed
docs: Update audio engine
1 parent c85e93f commit dfd9b6e

File tree

11 files changed

+17
-32
lines changed

11 files changed

+17
-32
lines changed

Assets/JCSUnity/Scripts/UI/Slider/JCS_SoundSlider.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ public class JCS_SoundSlider : MonoBehaviour
2525

2626
[Separator("Initialize Variables (JCS_SoundSlider)")]
2727

28-
[Tooltip("The mixer to control.")]
28+
[Tooltip("The mixer to control; if null assign the default mixer.")]
2929
[SerializeField]
3030
private AudioMixer mMixer = null;
3131

32-
[Tooltip("The target float parameter.")]
32+
[Tooltip("The target volume parameter.")]
3333
[SerializeField]
3434
private string mParameter = "";
3535

@@ -50,6 +50,10 @@ private void Awake()
5050

5151
private void Start()
5252
{
53+
// Assign default mixer.
54+
if (mMixer == null)
55+
mMixer = JCS_SoundSettings.instance.MIXER;
56+
5357
AddListener();
5458
}
5559

Assets/JCSUnity/Scripts/Util/JCS_Util.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
using UnityEngine.Audio;
1616
using UnityEngine.SceneManagement;
1717
using PeterVuorela.Tweener;
18-
using System.Data.Common;
1918

2019
namespace JCSUnity
2120
{
@@ -1305,7 +1304,7 @@ public static float GetLayerWeight(Animator ator, int index)
13051304
#region Audio
13061305

13071306
/// <summary>
1308-
/// Return the float value from audio mixer.
1307+
/// Return a float value from the audio mixer.
13091308
/// </summary>
13101309
public static float GetFloat(AudioMixer mixer, string parameter)
13111310
{

docs/ScriptReference/Actions/JCS_SoundPoolAction.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ A pool of audio clips.
77
| Name | Description |
88
|:------------------|:----------------------------------|
99
| mAudioClips | Pool of audio clips. |
10-
| mSoundSettingType | Sound type you want to organized. |
1110

1211
## Functions
1312

docs/ScriptReference/Actions/JCS_SoundProxyAction.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ the game object will be destroyed.
88
| Name | Description |
99
|:------------------|:---------------------|
1010
| mAudioClip | Sound to plays. |
11-
| mSoundSettingType | Sound settings type. |

docs/ScriptReference/Actions/JCS_SwingAttackAction.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Action to do swing attack.
1919
| mAnimOffsetPosition | Animation offset position value. |
2020
| mAnimOffsetScale | Animation offset scale value. |
2121
| mAudioClip | Sound to play for this action. |
22-
| mSoundType | Sound settings type. |
2322
| mApplyDamageTextAction | If you want the action apply damage text add apply this. |
2423
| mKeyCode | Key to active attack. |
2524
| mSpeedLayer | Speed layer. |

docs/ScriptReference/Effects/Pool/JCS_SoundPool.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Pool of sound.
77
| Name | Description |
88
|:------------------|:---------------------------------|
99
| mAudioClips | Pool of the audio clips. |
10-
| mSoundSettingType | Sound type you want to organize. |
1110

1211
## Functions
1312

docs/ScriptReference/Enums/JCS_SoundSettingType.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/ScriptReference/Managers/JCS_SoundManager.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,3 @@ Manage of all the music, sound and SFX in the game.
1717
|:------------------|:-----------------------------------------------------|
1818
| SwitchBGM | Switch the background music, fading in and out. |
1919
| PlayOneShotBGM | Play one shot background music, after playing it. |
20-
| PlayOneShotEffect | Push to the sound effect into array ready for use! |
21-
| SetVolume | Set the sound volume base on type. |
22-
| SetMute | Set weather the sound are mute or not by sound type. |

docs/ScriptReference/Settings/JCS_SoundSettings.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ Sound related settings.
66

77
| Name | Description |
88
|:----------------------------------|:--------------------------------------------------------------|
9-
| BGM_MUTE | Background music mute? |
10-
| EFFECT_MUTE | SFX mute? |
11-
| PERFONAL_EFFECT_MUTE | Player sound effect mute? |
12-
| BGM_SOUND | Background music volume. |
13-
| SFX_SOUND | SFX volume. |
14-
| SKILLS_SOUND | Play sound volume. |
9+
| MIXER | The current audio mixer. |
1510
| SOUND_FADEOUT_TIME | Time to fade out the background music. |
1611
| SOUND_FADEIN_TIME | Time to fade in the background music. |
1712
| KEEP_BGM_SWITCH_SCENE | Keep the background music when switch to next scene. |

docs/ScriptReference/UI/Slider/JCS_SoundSlider.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Slider component to control framework's sound control.
44

55
## Variables
66

7-
| Name | Description |
8-
|:---------------------------|:-----------------------------------------------------------------|
9-
| mSoundType | Sound type you would like the slider to control. |
7+
| Name | Description |
8+
|:-----------|:--------------------------------------------------------|
9+
| mMixer | The mixer to control; if null assign the default mixer. |
10+
| mParameter | The target volume parameter. |

0 commit comments

Comments
 (0)