Пример #1
0
    /// <summary>
    /// System音を流す
    /// </summary>
    /// <param name="seType">System音のタイプ</param>
    public void PlaySystemSE(SystemSoundEnum seType)
    {
        GameObject se = Instantiate(soundBuffer, transform);

        buffers.Add(se);
        SoundBuffer buffer = se.GetComponent <SoundBuffer>();

        buffer.Initialize();                        //初期化
        buffer.SetVolume(maxVolume);                //音量を設定
        buffer.SetClip(seResource[(int)seType]);    //音源設定
        buffer.Play(false);                         //流す
    }