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