📅  最后修改于: 2022-03-11 14:49:16.954000             🧑  作者: Mango
public AudioClip impact;
AudioSource audioSource;
void Start()
{
audioSource = GetComponent();
}
void OnCollisionEnter()
{
audioSource.PlayOneShot(impact, 0.7F);
}