Пример #1
0
 private void Accept()
 {
     for (int i = 0; i < activitiesContent.childCount; i++)
     {
         EventPanel eventPanel = activitiesContent.GetChild(i).GetComponent <EventPanel>();
         if (eventPanel != null && (eventPanel.CheckAccept() || prevState == GameState.WAIT_ACTIVITY_CHOICE))
         {
             eventPanel.Accept();
         }
     }
     Close();
 }
Пример #2
0
        public void CheckAccept()
        {
            bool flag = false;

            for (int i = 0; i < activitiesContent.childCount; i++)
            {
                EventPanel eventPanel = activitiesContent.GetChild(i).GetComponent <EventPanel>();
                if (eventPanel != null && eventPanel.CheckAccept())
                {
                    flag = true;
                }
                break;
            }
            if (flag)
            {
                acceptButton.gameObject.SetActive(true);
            }
            else
            {
                acceptButton.gameObject.SetActive(false);
            }
        }