using Components; using System.Collections; using System.Collections.Generic; using UnityEngine; public class BoxPengZhuang : MonoBehaviour { [SerializeField] Dialogue g1; [SerializeField] string name; [SerializeField] string dialogue; public bool isok = false; [SerializeField] GameObject g12; [SerializeField] int socre = 2; [SerializeField] string tips = "出示工作证"; [SerializeField] int id = 3; // Start is called before the first frame update void Start() { //WorkingPersonnel.instance.init(); //if (UIManager.Instance.ganTanHao) //{ // if (UIManager.Instance.ganTanHao.KeyGanTanHao.ContainsKey(GlobalFlag.userId)&&UIManager.Instance.isBox) // { // gameObject.SetActive(false); // } //} } private async void OnTriggerEnter(Collider other) { if (UIManager.Instance.ganTanHao) { if (other.name.Equals(name)) { g1.gameObject.SetActive(true); g1.init(dialogue); gameObject.transform.parent.GetComponent().StartMove(); gameObject.SetActive(false); //if (!UIManager.Instance.ganTanHao.KeyGanTanHao.ContainsKey(GlobalFlag.userId)) //{ // gameObject.SetActive(false); // UIManager.Instance.isBox = true; //} await FractionManager.Instance.overAsync(3, 2, "工作证"); } } } }