Ejemplo n.º 1
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);
    }
    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);
    }