// Use this for initialization void Start() { PlayerAmmo = FindObjectOfType <Ammunition>(); interaction = FindObjectOfType <InteractionUni>(); ammoAmount = Random.Range(1, 3); dialog = FindObjectOfType <DialogText>(); control = FindObjectOfType <BinController>(); }
private void Awake() { if (instance == null) { instance = this; //DontDestroyOnLoad(gameObject); } }
private void btnOK_Click(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(txtBinCode.Text)) { throw new Exception("请输入器具编号!"); } BinM = BinController.GetBinM(txtBinCode.Text); BinDs = BinController.GetBinDs(txtBinCode.Text); if (BtnClick != null) { BtnClick(sender, e); } } catch (Exception ex) { BLMUtils.ShowError(ex.Message); } }