protected void Awake() { anim = animatedObject.GetComponent <Animation>(); if (hasParticles) { if (GetComponent <ParticleSwitch>() != null) { particleController = GetComponent <ParticleSwitch>(); } else { Debug.LogError("no particleSwitch not atached to object"); } } if (hasSound) { if (soundPlayer == null) { if (GetComponent <SimpleSoundPlayer>() != null) { soundPlayer = GetComponent <SimpleSoundPlayer>(); } else { Debug.LogError("no particleSwitch not atached to object"); } } } }
void fadeoutbgm(Hashtable param) { float time = 1f; if (param.ContainsKey("time")) { time = float.Parse(param["time"] as string) / 1000f; } SimpleSoundPlayer player = ISoundPlayer.Instance as SimpleSoundPlayer; player.StopMusic(time); }
// **************************** Sound Tag ******************************* . void stopbgm(Hashtable param) { SimpleSoundPlayer player = ISoundPlayer.Instance as SimpleSoundPlayer; player.StopMusic(0f); }