void StartProducting(object sender, GameEventArgs e) { StartProductEvent startProductEvent = e as StartProductEvent; if ((sender as GameObject) != unit) { return; } if (startProductEvent._unitName != unit_Name) { if (Convert.ToInt32(txtProdingNum.text) > 0) { CoolingPanel.fillAmount = 1; txtProdingNum.visible = true; CoolingPanel.visible = true; } else { txtProdingNum.visible = false; CoolingPanel.visible = false; } return; } GameMapManager.Instance.coroutinesManager._StartCoroutine(SetCoolingPanel(startProductEvent.ProductTiem)); }
void CompletedProucting(object sender, GameEventArgs e) { StartProductEvent startProductEvent = e as StartProductEvent; if ((sender as GameObject) != unit || startProductEvent._unitName != unit_Name) { return; } int n = Convert.ToInt32(txtProdingNum.text) - 1; txtProdingNum.text = n.ToString(); if (n <= 0) { txtProdingNum.visible = false; CoolingPanel.visible = true; } }