예제 #1
0
    public void PushOne(Action action,MFUIManager.MFUIID baseUI = MFUIManager.MFUIID.None,
        uint pri = 0,string debugText = "")
    {
        MFUIQueueUnit unit = new MFUIQueueUnit()
        {
            UnitID = ++m_nextUnitID,
            act = action,
            UnitPriority = pri,
            BaseUIID = baseUI
        };

        if (baseUI == MFUIManager.MFUIID.None)
        {
            MFUIUtils.MFUIDebug(string.Concat(debugText, " Run 1"));
            unit.JustDoIt();
        }
        else if (baseUI == MFUIManager.CurrentUI && !IsLocking)
        {
            MFUIUtils.MFUIDebug(string.Concat(debugText, " Run 2"));
            unit.JustDoIt();
        }
        else
        {
            MFUIUtils.MFUIDebug(string.Concat(debugText, " Run 3"));
            m_listUI.Add(unit);

            m_listUI = m_listUI.OrderByDescending(t => t.UnitPriority).ToList();
        }
    }
예제 #2
0
    public void PushOne(Action action, MFUIManager.MFUIID baseUI = MFUIManager.MFUIID.None,
                        uint pri = 0, string debugText = "")
    {
        MFUIQueueUnit unit = new MFUIQueueUnit()
        {
            UnitID       = ++m_nextUnitID,
            act          = action,
            UnitPriority = pri,
            BaseUIID     = baseUI
        };

        if (baseUI == MFUIManager.MFUIID.None)
        {
            MFUIUtils.MFUIDebug(string.Concat(debugText, " Run 1"));
            unit.JustDoIt();
        }
        else if (baseUI == MFUIManager.CurrentUI && !IsLocking)
        {
            MFUIUtils.MFUIDebug(string.Concat(debugText, " Run 2"));
            unit.JustDoIt();
        }
        else
        {
            MFUIUtils.MFUIDebug(string.Concat(debugText, " Run 3"));
            m_listUI.Add(unit);

            m_listUI = m_listUI.OrderByDescending(t => t.UnitPriority).ToList();
        }
    }