コード例 #1
0
ファイル: Bin.cs プロジェクト: marcin4001/UnityTemplateCode
 // Use this for initialization
 void Start()
 {
     PlayerAmmo  = FindObjectOfType <Ammunition>();
     interaction = FindObjectOfType <InteractionUni>();
     ammoAmount  = Random.Range(1, 3);
     dialog      = FindObjectOfType <DialogText>();
     control     = FindObjectOfType <BinController>();
 }
コード例 #2
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         //DontDestroyOnLoad(gameObject);
     }
 }
コード例 #3
0
ファイル: UcBin.cs プロジェクト: 0000duck/MES-3
 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);
     }
 }