-
-
Save tsubaki/13ee04bef337a42ece94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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