public void ShowWindow(string name, object param = null) { XDebug.Log(XUIConst.Tag, $"ShowWindow {name}"); XUIWindow window = null; if (m_dictWindows.ContainsKey(name)) { window = m_dictWindows[name]; } else { var paramBundle = new XUIParamBundle(); paramBundle.AssetLoader = AssetLoader; paramBundle.LocalizationLoader = LocalizationLoader; paramBundle.EventManager = EventManager; paramBundle.MsgManager = MsgManager; paramBundle.uiRoot = uiRoot; paramBundle.TextureManager = TextureManager; window = XObjectPool.Alloc <XUIWindow>(); window.Init(this, paramBundle, name, param); m_listWindows.Add(window); m_dictWindows.Add(name, window); } window.DstState = XUIWindow.EnumState.Show; window.openTick = Time.realtimeSinceStartup; }
public override void OnEnter(object obj) { for (int i = 0; i < m_node.children.Count; ++i) { m_hehaviors.Add(XObjectPool.Alloc <XBTBehavior>()); } m_runEnter = true; }
public override void TickUI(float elapsedTime) { m_time += elapsedTime; var param = XObjectPool.Alloc <SampleView1.Param>(); param.Name = m_time.ToString("f2"); m_view.SampleView.SetData(param); }
protected override void ShowUI(View view) { var param = XObjectPool.Alloc <SampleView1.Param>(); m_view.SampleView.SetData(param); }
public static T AllocParam <T>() where T : class, IXPoolable, new() { return(XObjectPool.Alloc <T>()); }