Exemple #1
0
 public void PlaySE(SEName cueName)
 {
     //Timerが鳴っていたら止める
     if (currentSeIndex == 20)
     {
         seSource.Stop();
     }
     currentSeIndex = (int)cueName;
     seSource.Play(currentSeIndex);
 }
Exemple #2
0
        // 引数に渡されたSEを鳴らす
        public void playSE(SEName name)
        {
            AudioClip tmpClip = null;

            switch (name)
            {
            case SEName.Hit:        tmpClip = _Hit;        break;

            case SEName.PLDeath:    tmpClip = _PLDeath;    break;

            case SEName.ShotDelete: tmpClip = _ShotDelete; break;
            }

            // SE重複再生、nullの阻止
            if (tmpClip == null ||
                (_AudioSource.clip == tmpClip && _AudioSource.isPlaying))
            {
                return;
            }

            _AudioSource.clip = tmpClip;
            _AudioSource.Play();
        }
 public void GetString(string expected, SEName name)
 {
     Assert.AreEqual(expected, name.GetString());
 }
Exemple #4
0
 /// <summary>
 /// SENameの文字列を取得する。
 /// </summary>
 /// <param name="name">SceneName</param>
 /// <returns>SENameの文字列</returns>
 public static string GetString(this SEName name)
 {
     return(values [(int)name]);
 }
Exemple #5
0
 public void PlaySE(SEName cueName)
 {
     PlaySE(seNameDict[(int)cueName]);
 }
Exemple #6
0
 public void PlaySE(SEName soundName)
 {
     audiose.PlayOneShot(soundList[(int)soundName]);
 }