public void TimePass() { //旧时限部分 #region //for(int i = 0; i < BlockTime.Length; i++) //{ // if(BlockTime[i] > 0) // { // BlockTime[i] -= 1; // if (BlockTime[i] == 0) // { // Texts_BlockTime[i].gameObject.SetActive(false); // NewStrs[i].gameObject.SetActive(true); // NewStrs[i].Active = false; // GC.Morale += 10; // } // else // Texts_BlockTime[i].text = "剩余封锁时间:" + BlockTime[i] + "时"; // } //} //if(TimeLeft > 0) //{ // TimeLeft -= 1; // if(TimeLeft == 0) // { // NewStrButton.interactable = true; // for(int i = 0; i < CurrentStrs.Length; i++) // { // if (CurrentStrs[i].Used == false) // { // CurrentStrs[i].Str.EffectRemove(GC); // CurrentStrs[i].Used = true; // CurrentStrs[i].UseButton.interactable = false; // GC.HourEvent.RemoveListener(CurrentStrs[i].TimePass); // if (CurrentStrs[i].Active == false) // { // GC.Morale -= 10; // BlockTime[CurrentStrs[i].StrNum] = 96; // NewStrs[CurrentStrs[i].StrNum].Active = true; // NewStrs[CurrentStrs[i].StrNum].gameObject.SetActive(false); // Texts_BlockTime[CurrentStrs[i].StrNum].gameObject.SetActive(true); // } // } // } // } //} #endregion if (TimeLeft > 0) { TimeLeft -= 1; if (TimeLeft == 0) { MeetingButton.interactable = true; for (int i = 0; i < ActiveStrs.Count; i++) { if (ActiveStrs[i].Active == false) { GC.Stamina -= 20; } ActiveStrs[i].Str.EffectRemove(GC); Destroy(ActiveStrs[i].gameObject); } ActiveStrs.Clear(); } } if (CultureTimeLeft > 0) { CultureTimeLeft -= 1; if (CultureTimeLeft == 0) { canChangeCulture = true; } } UpdateUI(); }