Commit 6b20d172 authored by Trương Khoa (NEGAXY)'s avatar Trương Khoa (NEGAXY)
parents 58d5815f b291ab66
fileFormatVersion: 2
guid: f4619d2d2a11b514396953c6b830e96a
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:
fileFormatVersion: 2
guid: 41ca13291e693154f9c52cc61fa8f0b1
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:
fileFormatVersion: 2
guid: 6fd6029be6f5306469f556ed61426750
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:
fileFormatVersion: 2
guid: ef3ab772f1ada74439fe655b4c3f1a06
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:
...@@ -16,7 +16,7 @@ public class OST : MonoBehaviour ...@@ -16,7 +16,7 @@ public class OST : MonoBehaviour
public AudioClip dragonSound; public AudioClip dragonSound;
public AudioClip narutoSound; public AudioClip narutoSound;
public AudioClip squidPunch; public AudioClip squidPunch;
public AudioClip collect; public AudioClip[] collects;
//-------------- //--------------
static WaitForSeconds delay0 = new WaitForSeconds(5); static WaitForSeconds delay0 = new WaitForSeconds(5);
...@@ -42,10 +42,18 @@ public class OST : MonoBehaviour ...@@ -42,10 +42,18 @@ public class OST : MonoBehaviour
StartCoroutine(CheckSoundCO()); StartCoroutine(CheckSoundCO());
//-------------- //--------------
} }
private float delaySpawn = 0f;
private void Update()
{
delaySpawn = Mathf.Max(0f, delaySpawn - Time.deltaTime);
}
public void PlayCollectSound() public void PlayCollectSound()
{ {
audioSource1.PlayOneShot(collect); if (delaySpawn == 0f)
{
audioSource1.PlayOneShot(collects[Random.Range(0, collects.Length)]);
delaySpawn = 0.1f;
}
} }
public void PlaySelectWeapon() public void PlaySelectWeapon()
{ {
......
...@@ -26990,11 +26990,36 @@ PrefabInstance: ...@@ -26990,11 +26990,36 @@ PrefabInstance:
propertyPath: deselectWeapon propertyPath: deselectWeapon
value: value:
objectReference: {fileID: 8300000, guid: 299901ee114b3a449837069435cdeb1f, type: 3} objectReference: {fileID: 8300000, guid: 299901ee114b3a449837069435cdeb1f, type: 3}
- target: {fileID: 5066009898101288189, guid: 4c33e04fd77f2194bb2e29ce4f03f5a0,
type: 3}
propertyPath: collects.Array.size
value: 4
objectReference: {fileID: 0}
- target: {fileID: 5066009898101288189, guid: 4c33e04fd77f2194bb2e29ce4f03f5a0, - target: {fileID: 5066009898101288189, guid: 4c33e04fd77f2194bb2e29ce4f03f5a0,
type: 3} type: 3}
propertyPath: sounds.Array.data[5] propertyPath: sounds.Array.data[5]
value: value:
objectReference: {fileID: 8300000, guid: 2f8b102b2ff075a46be7cfb9809dd431, type: 3} objectReference: {fileID: 8300000, guid: 2f8b102b2ff075a46be7cfb9809dd431, type: 3}
- target: {fileID: 5066009898101288189, guid: 4c33e04fd77f2194bb2e29ce4f03f5a0,
type: 3}
propertyPath: collects.Array.data[0]
value:
objectReference: {fileID: 8300000, guid: ef3ab772f1ada74439fe655b4c3f1a06, type: 3}
- target: {fileID: 5066009898101288189, guid: 4c33e04fd77f2194bb2e29ce4f03f5a0,
type: 3}
propertyPath: collects.Array.data[1]
value:
objectReference: {fileID: 8300000, guid: f4619d2d2a11b514396953c6b830e96a, type: 3}
- target: {fileID: 5066009898101288189, guid: 4c33e04fd77f2194bb2e29ce4f03f5a0,
type: 3}
propertyPath: collects.Array.data[2]
value:
objectReference: {fileID: 8300000, guid: 41ca13291e693154f9c52cc61fa8f0b1, type: 3}
- target: {fileID: 5066009898101288189, guid: 4c33e04fd77f2194bb2e29ce4f03f5a0,
type: 3}
propertyPath: collects.Array.data[3]
value:
objectReference: {fileID: 8300000, guid: 6fd6029be6f5306469f556ed61426750, type: 3}
- target: {fileID: 5313785517148740864, guid: 4c33e04fd77f2194bb2e29ce4f03f5a0, - target: {fileID: 5313785517148740864, guid: 4c33e04fd77f2194bb2e29ce4f03f5a0,
type: 3} type: 3}
propertyPath: m_Name propertyPath: m_Name
...@@ -45175,7 +45200,7 @@ PrefabInstance: ...@@ -45175,7 +45200,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 469985644, guid: 24f4214e71ba46046859b31f7dec5af4, type: 3} - target: {fileID: 469985644, guid: 24f4214e71ba46046859b31f7dec5af4, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -0.000000030583724 value: -0.000000052935466
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 469985645, guid: 24f4214e71ba46046859b31f7dec5af4, type: 3} - target: {fileID: 469985645, guid: 24f4214e71ba46046859b31f7dec5af4, type: 3}
propertyPath: m_Follow propertyPath: m_Follow
...@@ -45249,7 +45274,7 @@ PrefabInstance: ...@@ -45249,7 +45274,7 @@ PrefabInstance:
- target: {fileID: 7421222009779415704, guid: 24f4214e71ba46046859b31f7dec5af4, - target: {fileID: 7421222009779415704, guid: 24f4214e71ba46046859b31f7dec5af4,
type: 3} type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -0.000000030583724 value: -0.000000052935466
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7421222010078394949, guid: 24f4214e71ba46046859b31f7dec5af4, - target: {fileID: 7421222010078394949, guid: 24f4214e71ba46046859b31f7dec5af4,
type: 3} type: 3}
...@@ -6,7 +6,7 @@ using DG.Tweening; ...@@ -6,7 +6,7 @@ using DG.Tweening;
public class CoinCollection_GuiFx : MonoBehaviour public class CoinCollection_GuiFx : MonoBehaviour
{ {
public List<RectTransform> elements = new List<RectTransform>(); public List<RectTransform> elements = new List<RectTransform>();
public Vector3 target { set; get; } public Transform target { set; get; }
private void OnEnable() private void OnEnable()
{ {
StartCoroutine(ie_enable()); StartCoroutine(ie_enable());
...@@ -32,7 +32,7 @@ public class CoinCollection_GuiFx : MonoBehaviour ...@@ -32,7 +32,7 @@ public class CoinCollection_GuiFx : MonoBehaviour
foreach(RectTransform rect in elements) foreach(RectTransform rect in elements)
{ {
yield return new WaitForSeconds(Random.Range(0.01f, 0.1f)); yield return new WaitForSeconds(Random.Range(0.01f, 0.1f));
rect.DOMove(target, 0.7f).SetEase(Ease.InQuad).OnComplete(() => rect.DOMove(target.transform.position, 0.7f).SetEase(Ease.InQuad).OnComplete(() =>
{ {
rect.gameObject.SetActive(false); rect.gameObject.SetActive(false);
//IndieGame.Manager.EffectManager.Instance.SpawnCollectionSound(transform.position); //IndieGame.Manager.EffectManager.Instance.SpawnCollectionSound(transform.position);
......
...@@ -49,7 +49,7 @@ public class IngameCollection_GuiFx : MonoBehaviour ...@@ -49,7 +49,7 @@ public class IngameCollection_GuiFx : MonoBehaviour
elements[i].transform.DOScale(Vector3.one, 0.7f); elements[i].transform.DOScale(Vector3.one, 0.7f);
elements[i].transform.DOLocalMove(pos, 0.7f).SetEase(Ease.OutQuad); elements[i].transform.DOLocalMove(pos, 0.7f).SetEase(Ease.OutQuad);
} }
OST.instance.PlayCollectSound();
yield return new WaitForSeconds(0.3f); yield return new WaitForSeconds(0.3f);
foreach (Image rect in elements) foreach (Image rect in elements)
{ {
...@@ -57,6 +57,7 @@ public class IngameCollection_GuiFx : MonoBehaviour ...@@ -57,6 +57,7 @@ public class IngameCollection_GuiFx : MonoBehaviour
rect.transform.DOMove(target, 0.5f).SetEase(Ease.InQuad).OnComplete(() => rect.transform.DOMove(target, 0.5f).SetEase(Ease.InQuad).OnComplete(() =>
{ {
rect.gameObject.SetActive(false); rect.gameObject.SetActive(false);
OST.instance.PlayCollectSound();
//IndieGame.Manager.EffectManager.Instance.SpawnCollectionSound(transform.position); //IndieGame.Manager.EffectManager.Instance.SpawnCollectionSound(transform.position);
StarSystem.instance.planet.explosionCount.IncreaseInitChildCount(); StarSystem.instance.planet.explosionCount.IncreaseInitChildCount();
}); });
......
...@@ -85,7 +85,7 @@ public class HomeScreen : MonoBehaviour ...@@ -85,7 +85,7 @@ public class HomeScreen : MonoBehaviour
} }
public void ShowCoinFx() public void ShowCoinFx()
{ {
guiFx.target = icon.transform.position; guiFx.target = icon.transform;
guiFx.gameObject.SetActive(true); guiFx.gameObject.SetActive(true);
} }
public void OnClick_RemoveAds() public void OnClick_RemoveAds()
......
...@@ -54,7 +54,7 @@ public class SmashModeScreen : MonoBehaviour ...@@ -54,7 +54,7 @@ public class SmashModeScreen : MonoBehaviour
} }
public void ShowCoinFx() public void ShowCoinFx()
{ {
guiFx.target = icon.transform.position; guiFx.target = icon.transform;
guiFx.gameObject.SetActive(true); guiFx.gameObject.SetActive(true);
} }
public void OnReloadButton() public void OnReloadButton()
......
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