Пример #1
0
    public static void ClearAll()
    {
        //IL_0038: Unknown result type (might be due to invalid IL or missing references)
        //IL_003e: Expected O, but got Unknown
        //IL_0049: Unknown result type (might be due to invalid IL or missing references)
        //IL_004e: Expected O, but got Unknown
        bool isPlaying = Application.get_isPlaying();
        int  num       = mActiveList.size;

        while (num > 0)
        {
            UIDrawCall uIDrawCall = mActiveList[--num];
            if (Object.op_Implicit(uIDrawCall))
            {
                if (isPlaying)
                {
                    NGUITools.SetActive(uIDrawCall.get_gameObject(), false);
                }
                else
                {
                    NGUITools.DestroyImmediate(uIDrawCall.get_gameObject());
                }
            }
        }
        mActiveList.Clear();
    }
Пример #2
0
    private static UIDrawCall Create(string name)
    {
        //IL_0034: Unknown result type (might be due to invalid IL or missing references)
        //IL_003a: Expected O, but got Unknown
        //IL_0042: Unknown result type (might be due to invalid IL or missing references)
        //IL_0047: Expected O, but got Unknown
        if (mInactiveList.size > 0)
        {
            UIDrawCall uIDrawCall = mInactiveList.Pop();
            mActiveList.Add(uIDrawCall);
            if (name != null)
            {
                uIDrawCall.set_name(name);
            }
            NGUITools.SetActive(uIDrawCall.get_gameObject(), true);
            return(uIDrawCall);
        }
        GameObject val = new GameObject(name);

        Object.DontDestroyOnLoad(val);
        UIDrawCall uIDrawCall2 = val.AddComponent <UIDrawCall>();

        mActiveList.Add(uIDrawCall2);
        return(uIDrawCall2);
    }
 public static void Destroy(UIDrawCall dc)
 {
     if (dc)
     {
         dc.onRender = null;
         if (Application.get_isPlaying())
         {
             if (UIDrawCall.mActiveList.Remove(dc))
             {
                 NGUITools.SetActive(dc.get_gameObject(), false);
                 UIDrawCall.mInactiveList.Add(dc);
             }
         }
         else
         {
             UIDrawCall.mActiveList.Remove(dc);
             NGUITools.DestroyImmediate(dc.get_gameObject());
         }
     }
 }
    public static void ClearAll()
    {
        bool isPlaying = Application.get_isPlaying();
        int  i         = UIDrawCall.mActiveList.size;

        while (i > 0)
        {
            UIDrawCall uIDrawCall = UIDrawCall.mActiveList[--i];
            if (uIDrawCall)
            {
                if (isPlaying)
                {
                    NGUITools.SetActive(uIDrawCall.get_gameObject(), false);
                }
                else
                {
                    NGUITools.DestroyImmediate(uIDrawCall.get_gameObject());
                }
            }
        }
        UIDrawCall.mActiveList.Clear();
    }
    private static UIDrawCall Create(string name, UIPanel pan, Material mat, Texture tex, Shader shader)
    {
        UIDrawCall uIDrawCall = UIDrawCall.Create(name);

        uIDrawCall.get_gameObject().set_layer(pan.cachedGameObject.get_layer());
        uIDrawCall.baseMaterial = mat;
        uIDrawCall.mainTexture  = tex;
        uIDrawCall.shader       = shader;
        uIDrawCall.renderQueue  = pan.startingRenderQueue;
        uIDrawCall.sortingOrder = pan.sortingOrder;
        uIDrawCall.manager      = pan;
        return(uIDrawCall);
    }
Пример #6
0
    private static UIDrawCall Create(string name, UIPanel pan, Material mat, Texture tex, Shader shader)
    {
        //IL_0008: Unknown result type (might be due to invalid IL or missing references)
        UIDrawCall uIDrawCall = Create(name);

        uIDrawCall.get_gameObject().set_layer(pan.cachedGameObject.get_layer());
        uIDrawCall.baseMaterial = mat;
        uIDrawCall.mainTexture  = tex;
        uIDrawCall.shader       = shader;
        uIDrawCall.renderQueue  = pan.startingRenderQueue;
        uIDrawCall.sortingOrder = pan.sortingOrder;
        uIDrawCall.manager      = pan;
        return(uIDrawCall);
    }
    public static void ReleaseInactive()
    {
        int i = UIDrawCall.mInactiveList.size;

        while (i > 0)
        {
            UIDrawCall uIDrawCall = UIDrawCall.mInactiveList[--i];
            if (uIDrawCall)
            {
                NGUITools.DestroyImmediate(uIDrawCall.get_gameObject());
            }
        }
        UIDrawCall.mInactiveList.Clear();
    }
Пример #8
0
 public static void Destroy(UIDrawCall dc)
 {
     //IL_002d: Unknown result type (might be due to invalid IL or missing references)
     //IL_0033: Expected O, but got Unknown
     //IL_0055: Unknown result type (might be due to invalid IL or missing references)
     //IL_005a: Expected O, but got Unknown
     if (Object.op_Implicit(dc))
     {
         dc.onRender = null;
         if (Application.get_isPlaying())
         {
             if (mActiveList.Remove(dc))
             {
                 NGUITools.SetActive(dc.get_gameObject(), false);
                 mInactiveList.Add(dc);
             }
         }
         else
         {
             mActiveList.Remove(dc);
             NGUITools.DestroyImmediate(dc.get_gameObject());
         }
     }
 }
Пример #9
0
    public static void ReleaseInactive()
    {
        //IL_002c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0031: Expected O, but got Unknown
        int num = mInactiveList.size;

        while (num > 0)
        {
            UIDrawCall uIDrawCall = mInactiveList[--num];
            if (Object.op_Implicit(uIDrawCall))
            {
                NGUITools.DestroyImmediate(uIDrawCall.get_gameObject());
            }
        }
        mInactiveList.Clear();
    }
    private static UIDrawCall Create(string name)
    {
        if (UIDrawCall.mInactiveList.size > 0)
        {
            UIDrawCall uIDrawCall = UIDrawCall.mInactiveList.Pop();
            UIDrawCall.mActiveList.Add(uIDrawCall);
            if (name != null)
            {
                uIDrawCall.set_name(name);
            }
            NGUITools.SetActive(uIDrawCall.get_gameObject(), true);
            return(uIDrawCall);
        }
        GameObject gameObject = new GameObject(name);

        Object.DontDestroyOnLoad(gameObject);
        UIDrawCall uIDrawCall2 = gameObject.AddComponent <UIDrawCall>();

        UIDrawCall.mActiveList.Add(uIDrawCall2);
        return(uIDrawCall2);
    }