public GameObject LoadView(string tPath, Transform tParent = null) { GameObject viewObj = _AssetManager.GetGameObject(tPath); Transform viewTrans = viewObj.transform; if (tParent != null) { viewTrans.SetParent(tParent); } else { viewTrans.SetParent(mViewRootTrans); } viewTrans.localScale = Vector3.one; viewTrans.localPosition = Vector3.zero; mViewObjs.Add(viewObj); ViewBase mViewBase = viewObj.GetComponent <ViewBase>(); mViewBase.RecordLoadPath(tPath); ViewAttr mViewAttr = viewObj.GetComponent <ViewAttr>(); ViewRoot mViewRoot = mViewRootDic[mViewAttr.mViewType]; mViewRoot.AddChild(mViewAttr); return(viewObj); }
/// <summary> /// 同意解散请求 /// </summary> private void ConfirmDisloveHandler() { var disloveC2S = new DissloveRoomConfirmC2S(); NetMgr.Instance.SendBuff(SocketType.BATTLE, MsgNoC2S.DISSLOVEROOM_CONFIRM_C2S.GetHashCode(), 0, disloveC2S, false); //UIManager.Instance.HideUI(UIViewID.DISLOVE_APPLY_VIEW); ViewRoot.SetActive(false); }
public BattleVM(ViewRoot root) { backButton = new BackButtonVM(); skillInfo = new SkillInfoVM(); skillCutIn = new SkillCutInVM(); root.Bind(backButton); root.Bind(skillInfo); root.Bind(skillCutIn); }
private View(ViewRoot viewRoot, ConfigSpec configSpec, ProductId productId, TargetVersion targetVersion, SrBranchName srBranchName, string build, ViewType?viewType) { ViewRoot = viewRoot; ConfigSpec = configSpec; ProductId = productId; TargetVersion = targetVersion; SrBranchName = srBranchName; Build = build; ViewType = viewType; }
public void UpdateView(ViewAttr tViewAttr) { if (!mViewObjs.Contains(tViewAttr.gameObject)) { return; } ViewRoot mViewRoot = mViewRootDic[tViewAttr.mViewType]; mViewRoot.UpdateChild(tViewAttr); }
/// <summary> /// Starts this /// <code>Application</code> /// . /// </summary> public void Start( ) { ViewRoot.Content = PrepareViewRoot ? .Invoke( ); Console.KeyPressed += KeyWatcherOnKeyPressed; Console.SizeChanged += Console_SizeChanged; Console.Start( ); ViewRoot.Enabled = true; ViewRoot.ResumeRedraw( ); }
public void UnLoadView(ViewAttr tViewAttr) { if (!mViewObjs.Contains(tViewAttr.gameObject)) { return; } mViewObjs.Remove(tViewAttr.gameObject); ViewRoot mViewRoot = mViewRootDic[tViewAttr.mViewType]; mViewRoot.RemoveChild(tViewAttr); }
void Awake() { mViewRootTrans = GameObject.Find("Facade/UIRoot").transform; mViewRootDic = new Dictionary <ViewTypeEnum, ViewRoot>(); for (ViewTypeEnum i = ViewTypeEnum.main; i < ViewTypeEnum.loadingcircle; i++) { int baseIndex = (int)i; mViewRootDic[i] = new ViewRoot(baseIndex * 1000, (baseIndex + 1) * 1000); } }
public void BindVM(BattleData data) { ViewRoot root = Object.FindObjectOfType <ViewRoot>(); List <UnitVM> playerUnits = CreateUnitVMList(data.PlayerUnit.GetData()); List <UnitVM> rivalUnits = CreateUnitVMList(data.RivalUnit.GetData()); this.unitListVM = new UnitListVM(playerUnits, rivalUnits); this.battleVM = new BattleVM(root); this.guideVM = new GuideVM() { GuideText = "" }; root.Bind(this.unitListVM); root.Bind(this.guideVM); root.SetContext(); }
public static View LoadView(string directory) { var wdv = CommandLineExecutor.ExecuteCleartool("pwv -wdview") .Replace("Working directory view: ", string.Empty) .Trim(); if (wdv.Contains("** NONE")) { return(null); } var localRoot = CommandLineExecutor.ExecuteCleartool("pwv -root").Trim(); var stgPath = CommandLineExecutor.ExecuteCleartool($"lsview {wdv}").Split(' ').Last().Trim(); var root = new ViewRoot(localRoot, stgPath); var cs = root?.GetConfigSpec(); var type = cs?.GetViewType(); var view = type == null?View.Unknown(root, cs) : type.Value == ViewType.Sr ? View.Sr(root, cs, cs.GetProductId(), cs.GetTargetVersion(), cs.GetSrBranchName()) : type.Value == ViewType.Build ? View.Bld(root, cs, cs.GetProductId(), cs.GetTargetVersion(), cs.GetBuild()) : null; return(view); }
public static ConfigSpec GetConfigSpec(this ViewRoot src) { var rawConfigSpec = new ConfigSpec(File.ReadAllLines(Path.Combine(src.ServerAccessPath, "config_spec"))); return(rawConfigSpec.FormatCs()); }
public static View Unknown(ViewRoot viewRoot, ConfigSpec configSpec) { return(new View(viewRoot, configSpec, null, null, null, null, null)); }
public override void OnHide() { base.OnHide(); UIManager.Instance.HidenDOTween(ViewRoot.GetComponent <RectTransform>(), null); // ApplicationFacade.Instance.RemoveMediator(Mediators.DISLOVESTATISTICS_VIEW_MEDIATOR); }
public override void OnShow() { base.OnShow(); UIManager.Instance.ShowUIMask(UIViewID.DISLOVE_STATISTICS_VIEW); UIManager.Instance.ShowDOTween(ViewRoot.GetComponent <RectTransform>()); }
public static View Sr(ViewRoot viewRoot, ConfigSpec configSpec, ProductId productId, TargetVersion targetVersion, SrBranchName srBranchName) { return(new View(viewRoot, configSpec, productId, targetVersion, srBranchName, null, Model.ViewType.Sr)); }
private void Awake() { m_instace = this; }
private void Console_SizeChanged(object sender, ConsoleSizeChangedEvnetArgs e) => ViewRoot.RequestUpdateDisplay( );
public override void OnHide() { UIManager.Instance.HidenDOTween(ViewRoot.GetComponent <RectTransform>(), base.OnHide); }
public static View Bld(ViewRoot viewRoot, ConfigSpec configSpec, ProductId productId, TargetVersion targetVersion, string build) { return(new View(viewRoot, configSpec, productId, targetVersion, null, build, Model.ViewType.Build)); }