holopy3/Assets/Ancient Modular Tombs/Scripts/Arrows_trap.cs

20 lines
324 B
C#
Raw Normal View History

2020-12-10 14:25:12 +00:00
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(AudioSource))]
public class Arrows_trap : MonoBehaviour {
public Animator animator;
void Start () {
}
void OnTriggerEnter(Collider other){
animator.enabled = true;
AudioSource audio = GetComponent<AudioSource> ();
audio.Play ();
}
}