//SEを再生
    public static void PlaySE(SE_NAME seEnum, GameObject obj)
    {
        SEs         se = seDictionary[seEnum];
        AudioSource audio;

        audio        = isComponent(obj);
        audio.loop   = false;
        audio.clip   = se.se;
        audio.volume = nowVolume * se.volume;
        audio.Play();
    }
    //SEを再生
    public static void PlaySE(SE_NAME seEnum)
    {
        SEs         se    = seDictionary[seEnum];
        AudioSource audio = myObj.GetComponent <AudioSource>();

        audio.loop   = false;
        audio.clip   = se.se;
        audio.volume = nowVolume * se.volume;

        audio.Play();
    }
Exemple #3
0
 /// <summary>
 /// SEの再生、どのSEを使うか選択して!
 /// </summary>
 /// <param name="seType"></param>
 public static void SePlay(SE_NAME seType)
 {
     //被って流せる音は最大10つまで
     //再生中でないオーディオを探す
     foreach (AudioSource se in SE_Manager_.seArr)
     {
         if (!se.isPlaying)
         {
             se.PlayOneShot(SE_Manager_.seDataList[(int)seType].audio);
             break;
         }
     }
 }
Exemple #4
0
	//SEを再生
	public static void PlaySE(SE_NAME seEnum, GameObject obj) {
		SEs se = seDictionary[seEnum];
		AudioSource audio;

		audio = isComponent(obj);
		audio.loop = false;
		audio.clip = se.se;
		audio.volume = nowVolume*se.volume;
		audio.Play();
	}
Exemple #5
0
	//SEを再生
	public static void PlaySE(SE_NAME seEnum) {
		SEs se = seDictionary[seEnum];
		AudioSource audio = myObj.GetComponent<AudioSource>();

		audio.loop = false;
		audio.clip = se.se;
		audio.volume = nowVolume*se.volume;
		audio.Play();
	}