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