using System.Collections; using System.Collections.Generic; using UnityEngine; public class Pingban : MonoBehaviour { public GameObject pb; public GameObject jt; private void OnTriggerStay(Collider other) { if (other.gameObject.tag=="Player") { print("进入范围"); if (Input.GetKeyDown(KeyCode.F)) { print("按下F"); GameManager.GetInstance().IsHasIpad = true; pb.SetActive(false); jt.SetActive(false); TaskCenter.GetInstance().FinishTask(0); } } } }