Example #1
0
    public override void Show()
    {
        base.Show();
        matchesList.Clear();
        string fullDirectoryPath = Application.dataPath + "/" + matchDataFolder;

        matchNotFound.SetActive(true);
        try
        {
            DirectoryInfo matchDataInfo = new DirectoryInfo(fullDirectoryPath);
            //Debug.Log(fullPath);
            if (matchDataInfo != null)
            {
                FileInfo[] matchFiles = matchDataInfo.GetFiles();
                foreach (FileInfo fileInfo in matchFiles)
                {
                    if (fileInfo.Extension.ToLower() == ".json")
                    {
                        matchNotFound.SetActive(false);
                        matchesList.AddItem(fileInfo.Name, delegate()
                        {
                            if (matchPlayerController.LoadJSON(fileInfo.FullName))
                            {
                                if (rightPanelManager && matchPlayerPanelController)
                                {
                                    rightPanelManager.ShowPanel(matchPlayerPanelController);
                                    if (currentMatchButtonContainer)
                                    {
                                        currentMatchButtonContainer.SetActive(true);
                                    }
                                }
                            }
                        });
                    }
                }
                matchesList.RefreshList();
            }
        }
        catch (Exception ex)
        {
        }
    }
Example #2
0
 void OnDisable()
 {
     haveGeneral = false;
     generalsList.Clear();
 }
Example #3
0
 void OnDisable()
 {
     havePrison = false;
     prisonerList.Clear();
 }
Example #4
0
 void OnDisable()
 {
     generalsList.Clear();
 }
Example #5
0
 void OnDisable()
 {
     generalsInfoList.Clear();
     objsList.Clear();
 }
Example #6
0
 void OnDisable()
 {
     kingList.Clear();
 }
 void OnDisable()
 {
     targetList.Clear();
 }
 public void SetList(ref T[] contentList)
 {
     controller.Clear();
     controller.AddItems(contentList);
 }