using System.Collections; using System.Collections.Generic; using UnityEngine; public class CharacterSE : MonoBehaviour { //音源 public AudioClip shoesSE; // Use this for initialization void Start () { } // Update is called once per frame void Update () { } //numでならすSEを指定する public void PlayCharaSE(int num) { switch (num) { case 0: SetandPlaySE(shoesSE); break; case 1: break; default: break; } } //SEを鳴らす void SetandPlaySE(AudioClip se) { GetComponent().PlayOneShot(se); } }