internal static void PlayLowFx() { GameObject fxObj = Instantiate(Resources.Load <GameObject>("Prefabs/SoundFxPrefab")); FxControl controller = fxObj.GetComponent <FxControl>(); controller.SetAudioClip(m_fx_low); Debug.Log("增加音效"); }
internal static void PlayButtonClickFx(float v) { GameObject fxObj = Instantiate(Resources.Load <GameObject>("Prefabs/SoundFxPrefab")); FxControl controller = fxObj.GetComponent <FxControl>(); controller.SetAudioClip(m_fx_click); controller.audioSource.volume = v; Debug.Log("增加音效"); }
void Start() { MyFxControl = MyParticleSys.GetComponent <FxControl>(); CurrentHP = MaxHP; }