示例#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)
        {
        }
    }
示例#2
0
 void OnDisable()
 {
     haveGeneral = false;
     generalsList.Clear();
 }
示例#3
0
 void OnDisable()
 {
     havePrison = false;
     prisonerList.Clear();
 }
示例#4
0
 void OnDisable()
 {
     generalsList.Clear();
 }
示例#5
0
 void OnDisable()
 {
     generalsInfoList.Clear();
     objsList.Clear();
 }
示例#6
0
 void OnDisable()
 {
     kingList.Clear();
 }
 void OnDisable()
 {
     targetList.Clear();
 }
 public void SetList(ref T[] contentList)
 {
     controller.Clear();
     controller.AddItems(contentList);
 }