//下一轮开会投票 public void NextVote() { CheckVoteStatus(); SkillConfirmButton.SetActive(false); for (int i = 0; i < VoteStrs.Count; i++) { if (VoteStrs[i].Active == true) { TempStrs.Add(VoteStrs[i].Str); StrInfos.Remove(VoteStrs[i].TargetStr);//在待激活面板中删除对应战略 } Destroy(VoteStrs[i].TargetStr.gameObject); Destroy(VoteStrs[i].gameObject); } VoteStrs.Clear(); if (VoteSeqNum == 3) { VoteSeqNum = 0; } else { VoteSeqNum += 1; if (VoteSeqNum == 3) { VoteSeqNum += 1; } } if (VoteSeqNum < 5) { StartVote(); } else { for (int i = 0; i < TempStrs.Count; i++) { StrategyInfo NewStr = Instantiate(ActivePrefab, ActiveStrsContent); NewStr.SC = this; NewStr.Str = TempStrs[i]; NewStr.UpdateUI(); NewStr.Str.Effect(GC); ActiveStrs.Add(NewStr); } MeetingButton.interactable = false; TempStrs.Clear(); TimeLeft = 384; if (CultureTimeLeft == -1) { CultureTimeLeft = 1152; } UpdateUI(); VotePanel.gameObject.SetActive(false); } }
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(); }