Button Click Sound Added
This commit is contained in:
parent
5444ba8f1c
commit
9ccfb47c8d
@ -61,6 +61,20 @@ AudioMixerGroupController:
|
|||||||
m_Mute: 0
|
m_Mute: 0
|
||||||
m_Solo: 0
|
m_Solo: 0
|
||||||
m_BypassEffects: 0
|
m_BypassEffects: 0
|
||||||
|
--- !u!244 &-1435410429410537098
|
||||||
|
AudioMixerEffectController:
|
||||||
|
m_ObjectHideFlags: 3
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_EffectID: 5b00762822cfd2843bd06e5a02255375
|
||||||
|
m_EffectName: Attenuation
|
||||||
|
m_MixLevel: e7fa564adc975a544964404badaba43b
|
||||||
|
m_Parameters: []
|
||||||
|
m_SendTarget: {fileID: 0}
|
||||||
|
m_EnableWetMix: 0
|
||||||
|
m_Bypass: 0
|
||||||
--- !u!244 &-671410346139079125
|
--- !u!244 &-671410346139079125
|
||||||
AudioMixerEffectController:
|
AudioMixerEffectController:
|
||||||
m_ObjectHideFlags: 3
|
m_ObjectHideFlags: 3
|
||||||
@ -119,6 +133,7 @@ AudioMixerController:
|
|||||||
- 08116dbf9979b7b4d8fcce772ec5ebfc
|
- 08116dbf9979b7b4d8fcce772ec5ebfc
|
||||||
- dd1cda19a45ef294d8789a2af47afcf7
|
- dd1cda19a45ef294d8789a2af47afcf7
|
||||||
- fcd09f92e84dbb2498492d6cb9c06bcd
|
- fcd09f92e84dbb2498492d6cb9c06bcd
|
||||||
|
- 17d772ec976972c4ca0d201034c8d9d1
|
||||||
name: View
|
name: View
|
||||||
m_CurrentViewIndex: 0
|
m_CurrentViewIndex: 0
|
||||||
m_TargetSnapshot: {fileID: 24500006}
|
m_TargetSnapshot: {fileID: 24500006}
|
||||||
@ -137,6 +152,7 @@ AudioMixerGroupController:
|
|||||||
- {fileID: 8377903610078173799}
|
- {fileID: 8377903610078173799}
|
||||||
- {fileID: 6090405236815604520}
|
- {fileID: 6090405236815604520}
|
||||||
- {fileID: 1886016463503660043}
|
- {fileID: 1886016463503660043}
|
||||||
|
- {fileID: 7051737336861099880}
|
||||||
m_Volume: c8ed3e32c19202b4daadc5c4fb90bf76
|
m_Volume: c8ed3e32c19202b4daadc5c4fb90bf76
|
||||||
m_Pitch: d51ab31c176e6894b94b24c01f74415f
|
m_Pitch: d51ab31c176e6894b94b24c01f74415f
|
||||||
m_Send: 00000000000000000000000000000000
|
m_Send: 00000000000000000000000000000000
|
||||||
@ -237,6 +253,25 @@ AudioMixerEffectController:
|
|||||||
m_SendTarget: {fileID: 0}
|
m_SendTarget: {fileID: 0}
|
||||||
m_EnableWetMix: 0
|
m_EnableWetMix: 0
|
||||||
m_Bypass: 0
|
m_Bypass: 0
|
||||||
|
--- !u!243 &7051737336861099880
|
||||||
|
AudioMixerGroupController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button
|
||||||
|
m_AudioMixer: {fileID: 24100000}
|
||||||
|
m_GroupID: 17d772ec976972c4ca0d201034c8d9d1
|
||||||
|
m_Children: []
|
||||||
|
m_Volume: 357a4eef3e901c24a86499d91a27adca
|
||||||
|
m_Pitch: ac2db1d54ca691e43989238d88f22626
|
||||||
|
m_Send: 00000000000000000000000000000000
|
||||||
|
m_Effects:
|
||||||
|
- {fileID: -1435410429410537098}
|
||||||
|
m_UserColorIndex: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_Solo: 0
|
||||||
|
m_BypassEffects: 0
|
||||||
--- !u!243 &8377903610078173799
|
--- !u!243 &8377903610078173799
|
||||||
AudioMixerGroupController:
|
AudioMixerGroupController:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
1
Assets/Audio/Sound Effects/ButtonClick.bfxrsound
Normal file
1
Assets/Audio/Sound Effects/ButtonClick.bfxrsound
Normal file
@ -0,0 +1 @@
|
|||||||
|
2,0.5,,0.0239,0.3097,0.1586,0.3,0.7824,,,,,,,,,,,,,,,,,,1,,,,,,,masterVolume
|
7
Assets/Audio/Sound Effects/ButtonClick.bfxrsound.meta
Normal file
7
Assets/Audio/Sound Effects/ButtonClick.bfxrsound.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: de491cd1aed6a4740b25ebbf1bfc55c5
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
Assets/Audio/Sound Effects/ButtonClick.wav
Normal file
BIN
Assets/Audio/Sound Effects/ButtonClick.wav
Normal file
Binary file not shown.
22
Assets/Audio/Sound Effects/ButtonClick.wav.meta
Normal file
22
Assets/Audio/Sound Effects/ButtonClick.wav.meta
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 077bbd63db51b5145838abe533b7a657
|
||||||
|
AudioImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 6
|
||||||
|
defaultSettings:
|
||||||
|
loadType: 0
|
||||||
|
sampleRateSetting: 0
|
||||||
|
sampleRateOverride: 44100
|
||||||
|
compressionFormat: 1
|
||||||
|
quality: 1
|
||||||
|
conversionMode: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
preloadAudioData: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
ambisonic: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -122,7 +122,19 @@ MonoBehaviour:
|
|||||||
m_TargetGraphic: {fileID: 7680983655018497081}
|
m_TargetGraphic: {fileID: 7680983655018497081}
|
||||||
m_OnClick:
|
m_OnClick:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 0}
|
||||||
|
m_TargetAssemblyTypeName: UnityEngine.AudioSource, UnityEngine
|
||||||
|
m_MethodName: Play
|
||||||
|
m_Mode: 1
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 0
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 0
|
||||||
|
m_CallState: 2
|
||||||
--- !u!114 &6181795050297466372
|
--- !u!114 &6181795050297466372
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -229,7 +241,7 @@ MonoBehaviour:
|
|||||||
m_faceColor:
|
m_faceColor:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4294967295
|
||||||
m_fontSize: 48
|
m_fontSize: 32
|
||||||
m_fontSizeBase: 24
|
m_fontSizeBase: 24
|
||||||
m_fontWeight: 400
|
m_fontWeight: 400
|
||||||
m_enableAutoSizing: 1
|
m_enableAutoSizing: 1
|
||||||
|
@ -18,6 +18,7 @@ namespace UI
|
|||||||
public void OnPointerUp(PointerEventData eventData)
|
public void OnPointerUp(PointerEventData eventData)
|
||||||
{
|
{
|
||||||
text.transform.localPosition = initialTextPosition;
|
text.transform.localPosition = initialTextPosition;
|
||||||
|
UIManager.Instance.PlayClickSound();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Pausable;
|
using Pausable;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -8,8 +9,10 @@ namespace UI
|
|||||||
{
|
{
|
||||||
private static UIManager _instance = null;
|
private static UIManager _instance = null;
|
||||||
public static UIManager Instance => _instance;
|
public static UIManager Instance => _instance;
|
||||||
private Dictionary<string, Canvas> canvases = null;
|
|
||||||
public Pauser Pauser { get; private set; } = null;
|
public Pauser Pauser { get; private set; } = null;
|
||||||
|
private Dictionary<string, Canvas> canvases = null;
|
||||||
|
private AudioSource audioSource = null;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
@ -20,7 +23,11 @@ namespace UI
|
|||||||
Destroy(this);
|
Destroy(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start() => Pauser = gameObject.AddComponent<Pauser>();
|
private void Start()
|
||||||
|
{
|
||||||
|
Pauser = gameObject.AddComponent<Pauser>();
|
||||||
|
audioSource = gameObject.GetComponent<AudioSource>();
|
||||||
|
}
|
||||||
|
|
||||||
public void SwitchToCanvas(string canvasName)
|
public void SwitchToCanvas(string canvasName)
|
||||||
{
|
{
|
||||||
@ -54,5 +61,7 @@ namespace UI
|
|||||||
canvases.Add(child.name, child.GetComponent<Canvas>());
|
canvases.Add(child.name, child.GetComponent<Canvas>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void PlayClickSound() => audioSource.Play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user