Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Created May 18, 2015 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsubaki/13ee04bef337a42ece94 to your computer and use it in GitHub Desktop.
Save tsubaki/13ee04bef337a42ece94 to your computer and use it in GitHub Desktop.
using UnityEngine;
using System.Collections;
public class AudioCenterController : MonoBehaviour {
int soundId1, soundId2;
void Start (){
// オーディオの登録(拡張子は.wavのみ)
soundId1 = AudioCenter.loadSound ("Touch");
soundId2 = AudioCenter.loadSound ("Damage");
}
public void PlaySound1 ()
{
// オーディオ1の再生
AudioCenter.playSound (soundId1);
}
public void PlaySound2 ()
{
// オーディオ2の再生
AudioCenter.playSound (soundId2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment