// Start is called before the first frame update void Start() { pathFinder = FindObjectOfType <PathFinder>(); var path = pathFinder.GetPath(); StartCoroutine(FollowPath(path)); Base = FindObjectOfType <FBase>(); }
public List <FBase> OnFFClick(TreeViewItem fatherItem) { try { FBase current = (FBase)fatherItem.DataContext; return(GetFromPath(current.FullPath)); } catch (Exception ex) { return(null); } }
private void MasterItemSelected(object sender, RoutedEventArgs e) { TreeViewItem fatherItem = (TreeViewItem)myTree.SelectedItem; FBase fof = (FBase)fatherItem.DataContext; List <FBase> nextLevel = clickEventsIns.OnFFClick(fatherItem); if (nextLevel != null) { fatherItem.Items.Clear(); foreach (var ffItem in nextLevel) { TreeViewItem x = new TreeViewItem(); x.DataContext = (object)ffItem; x.Header = ffItem.Name; fatherItem.Items.Add(x); } } }
// Start is called before the first frame update void Start() { Base = FindObjectOfType <FBase>(); }