Exemple #1
0
    //下一轮开会投票
    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);
        }
    }