标签:frame 方法 unit pre hit oid engine audio span
定义成方法:
using System.Collections; using System.Collections.Generic; using UnityEngine; public class AudioManger : MonoBehaviour { AudioSource au; public AudioClip[] clip = new AudioClip[3]; // Use this for initialization void Start () { au = GetComponent<AudioSource>(); } public void PlayFaShe() { au.clip = clip[0]; au.Play(); } public void PlayHit() { au.clip = clip[1]; au.Play(); } public void PlayOver() { au.clip = clip[2]; au.Play(); } // Update is called once per frame void Update () { } }
标签:frame 方法 unit pre hit oid engine audio span
原文地址:https://www.cnblogs.com/huang--wei/p/9609461.html