Page 412 - MDP2022-3
P. 412
(5) 시체가 떨어지는 소리
시체가 떨어질 때 나는 소리
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FallSpot : MonoBehaviour
{
public GameObject fallObj;
public AudioSource audio;
private void OnTriggerEnter(Collider other)
{
if (other.tag == "Player")
{
fallObj.SetActive(true);
}
}
}