using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class audios : MonoBehaviour {
public static audios interest;
public AudioClip[] audios;
AudioSource a;
void Start () {
if (interest==null)
{
interest = this;
}
a = GetCommponent<AudioSource>();
}
// Update is called once per frame
void Update () {
}
public void plays(int i)
{
a.PlayOneShot(audios[i]);
}
}
using System.Collections.Generic;
using UnityEngine;
public class audios : MonoBehaviour {
public static audios interest;
public AudioClip[] audios;
AudioSource a;
void Start () {
if (interest==null)
{
interest = this;
}
a = GetCommponent<AudioSource>();
}
// Update is called once per frame
void Update () {
}
public void plays(int i)
{
a.PlayOneShot(audios[i]);
}
}