【特效】商店飞金币
parent
2923def249
commit
77c8a4bed9
Binary file not shown.
|
@ -0,0 +1,23 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b96dcf5ff3a274f0daacd0d412cd3411
|
||||||
|
AudioImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 7
|
||||||
|
defaultSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
loadType: 0
|
||||||
|
sampleRateSetting: 0
|
||||||
|
sampleRateOverride: 44100
|
||||||
|
compressionFormat: 1
|
||||||
|
quality: 1
|
||||||
|
conversionMode: 0
|
||||||
|
preloadAudioData: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
ambisonic: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -58,6 +58,8 @@ namespace Framework.Manager
|
||||||
string.Format(Framework.Constants.PathConstants.SoundPath, "S_Thumbtack")));
|
string.Format(Framework.Constants.PathConstants.SoundPath, "S_Thumbtack")));
|
||||||
PreLoadAudio("S_PlankDrop", await AssetManager.Instance.LoadAssetAsync<AudioClip>(
|
PreLoadAudio("S_PlankDrop", await AssetManager.Instance.LoadAssetAsync<AudioClip>(
|
||||||
string.Format(Framework.Constants.PathConstants.SoundPath, "S_PlankDrop")));
|
string.Format(Framework.Constants.PathConstants.SoundPath, "S_PlankDrop")));
|
||||||
|
PreLoadAudio("S_Coin", await AssetManager.Instance.LoadAssetAsync<AudioClip>(
|
||||||
|
string.Format(Framework.Constants.PathConstants.SoundPath, "S_Coin")));
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,9 +12,10 @@ namespace Gameplay.Manager
|
||||||
{
|
{
|
||||||
public class ShopManager : Singlenton<ShopManager>, IInitable
|
public class ShopManager : Singlenton<ShopManager>, IInitable
|
||||||
{
|
{
|
||||||
private Dictionary<PropType, int> _unusedPropCount;
|
|
||||||
public bool IsDebug;
|
public bool IsDebug;
|
||||||
|
public bool CanGfxCoin;
|
||||||
|
|
||||||
|
private Dictionary<PropType, int> _unusedPropCount;
|
||||||
private Dictionary<string, int> _consumableGoods;
|
private Dictionary<string, int> _consumableGoods;
|
||||||
private Dictionary<string, int> _nonConsumableGoods;
|
private Dictionary<string, int> _nonConsumableGoods;
|
||||||
private bool _init;
|
private bool _init;
|
||||||
|
@ -90,6 +91,13 @@ namespace Gameplay.Manager
|
||||||
}
|
}
|
||||||
|
|
||||||
CurCoin += coin;
|
CurCoin += coin;
|
||||||
|
if (!LevelManager.Instance.IsOver && !LevelManager.Instance.IsPause)
|
||||||
|
{
|
||||||
|
CanGfxCoin = true;
|
||||||
|
AudioManager.Instance.PlaySound(AudioType.SOUND, "S_Coin",
|
||||||
|
new UnityAudio(false));
|
||||||
|
}
|
||||||
|
|
||||||
EventManager.Instance.Send(EventManager.EventName.RefreshCoin);
|
EventManager.Instance.Send(EventManager.EventName.RefreshCoin);
|
||||||
SaveCoinsToLocal();
|
SaveCoinsToLocal();
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,10 +54,11 @@ public class CoinEffect : MonoBehaviour
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (LevelManager.Instance.CanGfxCoin && !GuideMananger.Instance.IsGuiding)
|
if ((LevelManager.Instance.CanGfxCoin || ShopManager.Instance.CanGfxCoin) && !GuideMananger.Instance.IsGuiding)
|
||||||
{
|
{
|
||||||
DestroyCoinsParent();
|
DestroyCoinsParent();
|
||||||
LevelManager.Instance.CanGfxCoin = false;
|
LevelManager.Instance.CanGfxCoin = false;
|
||||||
|
ShopManager.Instance.CanGfxCoin = false;
|
||||||
CoinEffectShow();
|
CoinEffectShow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue