コード例 #1
0
        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;
        }
コード例 #2
0
 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;
 }
コード例 #3
0
    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);
    }
コード例 #4
0
    protected override void ShowUI(View view)
    {
        var param = XObjectPool.Alloc <SampleView1.Param>();

        m_view.SampleView.SetData(param);
    }
コード例 #5
0
 public static T AllocParam <T>() where T : class, IXPoolable, new()
 {
     return(XObjectPool.Alloc <T>());
 }