Commit 28d9b213 authored by Hà Trung (NEGAXY)'s avatar Hà Trung (NEGAXY)

no message

parent b291ab66
......@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.070101134, g: 0.091011845, b: 0.079038166, a: 1}
m_IndirectSpecularColor: {r: 0.070097424, g: 0.09100845, b: 0.079035185, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
......@@ -32142,6 +32142,138 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 591684094}
m_CullTransparentMesh: 1
--- !u!1 &597918932
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 597918933}
- component: {fileID: 597918934}
m_Layer: 5
m_Name: Sound3
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &597918933
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 597918932}
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_Children: []
m_Father: {fileID: 3356609145624440186}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!82 &597918934
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 597918932}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 1
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 100
DopplerLevel: 0
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: 4
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: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &601960182
GameObject:
m_ObjectHideFlags: 0
......@@ -159755,8 +159887,14 @@ MonoBehaviour:
notifyMultiRewardPopup: {fileID: 441403250931543156}
buyCallbackPopup: {fileID: 4091296}
source: {fileID: 3356609145624440183}
source_2: {fileID: 597918934}
bg_mains:
- {fileID: 8300000, guid: ade6792c77394c84284692999cc0ecdd, type: 3}
coins:
- {fileID: 8300000, guid: f4619d2d2a11b514396953c6b830e96a, type: 3}
- {fileID: 8300000, guid: 41ca13291e693154f9c52cc61fa8f0b1, type: 3}
- {fileID: 8300000, guid: 6fd6029be6f5306469f556ed61426750, type: 3}
- {fileID: 8300000, guid: ef3ab772f1ada74439fe655b4c3f1a06, type: 3}
--- !u!82 &3356609145624440183
AudioSource:
m_ObjectHideFlags: 0
......@@ -159912,6 +160050,7 @@ RectTransform:
- {fileID: 3356609145762315769}
- {fileID: 750533567}
- {fileID: 1045058105}
- {fileID: 597918933}
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
......@@ -35,6 +35,7 @@ public class CoinCollection_GuiFx : MonoBehaviour
rect.DOMove(target.transform.position, 0.7f).SetEase(Ease.InQuad).OnComplete(() =>
{
rect.gameObject.SetActive(false);
GuiManager.Instance.PlayCollectSound();
//IndieGame.Manager.EffectManager.Instance.SpawnCollectionSound(transform.position);
});
}
......
......@@ -32,7 +32,9 @@ public class GuiManager : MonoBehaviour
[Header("Audios")]
public AudioSource source;
public AudioSource source_2;
public AudioClip[] bg_mains;
public AudioClip[] coins;
//private bool showLevel = false;
//public bool ShowLevel => showLevel;
......@@ -56,6 +58,19 @@ public class GuiManager : MonoBehaviour
{
ShowRate();
}
private float delaySpawn = 0f;
private void Update()
{
delaySpawn = Mathf.Max(0f, delaySpawn - Time.deltaTime);
}
public void PlayCollectSound()
{
if (delaySpawn == 0f && DataManager.Instance.IsSoundOn())
{
source_2.PlayOneShot(coins[Random.Range(0, coins.Length)]);
delaySpawn = 0.1f;
}
}
private void ShowRate()
{
if (DataManager.Instance.ShowRate)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment