Example #1
0
    internal static void PlayLowFx()
    {
        GameObject fxObj      = Instantiate(Resources.Load <GameObject>("Prefabs/SoundFxPrefab"));
        FxControl  controller = fxObj.GetComponent <FxControl>();

        controller.SetAudioClip(m_fx_low);
        Debug.Log("增加音效");
    }
Example #2
0
    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("增加音效");
    }
Example #3
0
 void Start()
 {
     MyFxControl = MyParticleSys.GetComponent <FxControl>();
     CurrentHP   = MaxHP;
 }