Skip to content

Commit

Permalink
Done doing on audio.
Browse files Browse the repository at this point in the history
  • Loading branch information
linxchxn committed Jan 11, 2023
1 parent 36f16a5 commit e15a24d
Show file tree
Hide file tree
Showing 6 changed files with 211 additions and 85 deletions.
10 changes: 5 additions & 5 deletions Assets/Scenes/Home Scene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -3553,7 +3553,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.58431375, g: 0.60784316, b: 0.7294118, a: 0.19215687}
m_Color: {r: 0.58431375, g: 0.60784316, b: 0.7294118, a: 0}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
Expand Down Expand Up @@ -4164,7 +4164,7 @@ MonoBehaviour:
m_Calls:
- m_Target: {fileID: 1885123649}
m_TargetAssemblyTypeName: UIController, Assembly-CSharp
m_MethodName: ToggleSFX
m_MethodName: PlaySFX
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
Expand Down Expand Up @@ -6607,8 +6607,8 @@ MonoBehaviour:
_musicSlider: {fileID: 750213826}
_sfxSlider: {fileID: 936068074}
music: {fileID: 148965077}
sfx: {fileID: 1997568880}
muteMusic: {fileID: 1293704659}
sfx: {fileID: 1293704659}
muteMusic: {fileID: 1997568880}
mutesfx: {fileID: 1114090810}
--- !u!1 &1943559775
GameObject:
Expand Down Expand Up @@ -7192,7 +7192,7 @@ MonoBehaviour:
m_Calls:
- m_Target: {fileID: 1885123649}
m_TargetAssemblyTypeName: UIController, Assembly-CSharp
m_MethodName: ToggleMusic
m_MethodName: PlayMusic
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
Expand Down
16 changes: 8 additions & 8 deletions Assets/Scenes/Play Scene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &333982611
RectTransform:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2980,7 +2980,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0.65882355, b: 1, a: 1}
m_Color: {r: 0.9607843, g: 0.9647059, b: 0.98039216, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
Expand All @@ -2990,7 +2990,7 @@ MonoBehaviour:
m_FontData:
m_Font: {fileID: 12800000, guid: 4e54dd497c54f6d4693ca9e9dbc8a206, type: 3}
m_FontSize: 35
m_FontStyle: 0
m_FontStyle: 1
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 92
Expand Down Expand Up @@ -4959,7 +4959,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.051886797, g: 0.67434376, b: 1, a: 1}
m_Color: {r: 0, g: 0.5921569, b: 0.9019608, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
Expand Down Expand Up @@ -5248,7 +5248,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Color: {r: 0.25490198, g: 0.6627451, b: 0.8745099, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
Expand Down Expand Up @@ -8607,8 +8607,8 @@ MonoBehaviour:
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9843138, g: 0.35686275, b: 0.27450982, a: 1}
m_PressedColor: {r: 1, g: 0, b: 0, a: 1}
m_HighlightedColor: {r: 0, g: 0.65882355, b: 1, a: 0.5803922}
m_PressedColor: {r: 0, g: 0.65882355, b: 1, a: 0.9019608}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
Expand Down Expand Up @@ -8666,7 +8666,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0.65882355, b: 1, a: 1}
m_Color: {r: 0, g: 0.5921569, b: 0.9019608, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
Expand Down
4 changes: 2 additions & 2 deletions Assets/Script/AudioManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void PlaySFX(string name)

public void ToggleMusic()
{
musicSource.mute = !musicSource.mute;
musicSource.mute = true;
}
public void playMusic()
{
Expand All @@ -61,7 +61,7 @@ public void playMusic()

public void ToggleSFX()
{
sfxSource.mute = !sfxSource.mute;
sfxSource.mute = true;
}
public void playSFX()
{
Expand Down
10 changes: 6 additions & 4 deletions Assets/Script/UIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,32 @@ public void SFXVolume()
public void GetMusicAndSFXButton()
{
musicStr=PlayerPrefs.GetString("Music");
muteMusicStr =PlayerPrefs.GetString("MuteMusic");
sfxStr= PlayerPrefs.GetString("SFX");
mutesfxStr=PlayerPrefs.GetString("MuteSFX");
if (musicStr == "clicked")
{
music.SetActive(false);
muteMusic.SetActive(true);
ToggleMusic();
}
muteMusicStr =PlayerPrefs.GetString("MuteMusic");
if (muteMusicStr == "clicked")
{
music.SetActive(true);
muteMusic.SetActive(false);


}
sfxStr= PlayerPrefs.GetString("SFX");
if (sfxStr=="clicked")
{
sfx.SetActive(false);
mutesfx.SetActive(true);
ToggleSFX();
}
mutesfxStr=PlayerPrefs.GetString("MuteSFX");
if (mutesfxStr == "clicked")
{
sfx.SetActive(true);
mutesfx.SetActive(false);

}

}
Expand Down
4 changes: 2 additions & 2 deletions ProjectSettings/TimelineSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: a287be6c49135cd4f9b2b8666c39d999, type: 3}
m_Name:
m_EditorClassIdentifier:
assetDefaultFramerate: 60
m_DefaultFrameRate: 60
assetDefaultFramerate: 120
m_DefaultFrameRate: 120
Loading

0 comments on commit e15a24d

Please sign in to comment.