using System; using System.Collections; using System.Collections.Generic; using Mono; using UnityEngine; public class Obstacle : MonoBehaviour { private void OnTriggerEnter(Collider other) { if (other.tag == "Player") { Player.Instance.SetMoveSpeed(-1f); UIManager.Instance.PlayAudioClip("Hit"); } } }