Beispiel #1
0
    public static void AddNodeToBranch(IDynamicBranch branch)
    {
        var noNodes = branch.ThisGroupsUiNodes.Length == 0;

        branch.SetThisGroupsNode(BranchChildNodeUtil.GetChildNodes(branch.ThisBranch));

        if (noNodes)
        {
            branch.DefaultStartOnThisNode = branch.ThisGroupsUiNodes.First();
            branch.LastHighlighted        = branch.DefaultStartOnThisNode;
            branch.LastSelected           = branch.DefaultStartOnThisNode;
        }
    }
Beispiel #2
0
 //Main
 private void Awake()
 {
     CheckForValidSetUp();
     ThisGroupsUiNodes            = BranchChildNodeUtil.GetChildNodes(this);
     MyCanvasGroup                = GetComponent <CanvasGroup>();
     MyCanvasGroup.blocksRaycasts = false;
     _uiTweener = GetComponent <UITweener>();
     MyCanvas   = GetComponent <Canvas>();
     if (IsHomeScreenBranch() || IsInGameBranch())
     {
         MyParentBranch = this;
     }
     AutoOpenCloseClass   = EZInject.Class.WithParams <IAutoOpenClose>(this);
     _branchTypeBaseClass = BranchFactory.Factory.PassThisBranch(this).CreateType(_branchType);
     _branchTypeBaseClass.OnAwake();
 }