Esempio n. 1
0
    public static void ReleaseInactive()
    {
        int num = mInactiveList.size;

        while (num > 0)
        {
            UIDrawCall uIDrawCall = mInactiveList[--num];
            if ((bool)uIDrawCall)
            {
                NGUITools.DestroyImmediate(uIDrawCall.gameObject);
            }
        }
        mInactiveList.Clear();
    }
Esempio n. 2
0
    /// <summary>
    /// Destroy all draw calls we've created when this script gets disabled.
    /// </summary>

    void OnDisable()
    {
        for (int i = mDrawCalls.size; i > 0;)
        {
            UIDrawCall dc = mDrawCalls.buffer[--i];
            if (dc != null)
            {
                NGUITools.DestroyImmediate(dc.gameObject);
            }
        }
        mDrawCalls.Clear();
        mChanged.Clear();
        mChildren.Clear();
    }
Esempio n. 3
0
 static int DestroyImmediate(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.CheckObject <UnityEngine.Object>(L, 1);
         NGUITools.DestroyImmediate(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 4
0
    public static void ReleaseInactive()
    {
        int i = UIDrawCall.mInactiveList.size;

        while (i > 0)
        {
            UIDrawCall uIDrawCall = UIDrawCall.mInactiveList[--i];
            if (uIDrawCall)
            {
                NGUITools.DestroyImmediate(uIDrawCall.gameObject);
            }
        }
        UIDrawCall.mInactiveList.Clear();
    }
Esempio n. 5
0
    /// <summary>
    /// Rebuild the draw call's material.
    /// </summary>

    Material RebuildMaterial()
    {
        // Destroy the old material
        NGUITools.DestroyImmediate(mDynamicMat);

        // Create a new material
        CreateMaterial();
        mDynamicMat.renderQueue = mRenderQueue;

        // Assign the main texture
        if (mTexture != null)
        {
            mDynamicMat.mainTexture = mTexture;
        }

        // Update the renderer
        if (mRenderer != null)
        {
            mRenderer.sharedMaterials = new Material[] { mDynamicMat }
        }
        ;
        return(mDynamicMat);
    }

    /// <summary>
    /// Update the renderer's materials.
    /// </summary>

    void UpdateMaterials()
    {
        if (panel == null)
        {
            return;
        }

        // If clipping should be used, we need to find a replacement shader
        if (mRebuildMat || mDynamicMat == null || mClipCount != panel.clipCount || mTextureClip != (panel.clipping == Clipping.TextureMask))
        {
            RebuildMaterial();
            mRebuildMat = false;
        }
        else if (mRenderer.sharedMaterial != mDynamicMat)
        {
#if UNITY_EDITOR
            Debug.LogError("Hmm... This point got hit!");
#endif
            mRenderer.sharedMaterials = new Material[] { mDynamicMat };
        }
    }
Esempio n. 6
0
 /*确定删除*/
 void ConfirmDelete(UnityEngine.GameObject friendGo)
 {
     friendDic.Remove(friendGo);
     NGUITools.DestroyImmediate(friendGo);
     RefreshFriendNum(friendDic.Count + "/" + 40);
     UnityEngine.Transform tf = gameObject.transform.Find("sp_heikuang/ScrollView/Grid");
     if (tf != null)
     {
         UIGrid ug = tf.gameObject.GetComponent <UIGrid>();
         if (ug != null)
         {
             ug.repositionNow = true;
         }
     }
 }
Esempio n. 7
0
    private void OnDisable()
    {
        int size = this.mDrawCalls.size;

        while (size > 0)
        {
            UIDrawCall call = this.mDrawCalls.buffer[--size];
            if (call != null)
            {
                NGUITools.DestroyImmediate(call.gameObject);
            }
        }
        this.mDrawCalls.Clear();
        this.mChanged.Clear();
    }
Esempio n. 8
0
    protected void ResetTweenAlpha(GameObject go)
    {
        TweenAlpha component = go.GetComponent <TweenAlpha>();

        if (component != null)
        {
            NGUITools.DestroyImmediate(component);
        }
        UIWidget component2 = go.GetComponent <UIWidget>();

        if (component2 != null)
        {
            component2.alpha = 1f;
        }
    }
Esempio n. 9
0
    private void OnDisable()
    {
        int i = this.mDrawCalls.size;

        while (i > 0)
        {
            UIDrawCall uidrawCall = this.mDrawCalls.buffer[--i];
            if (uidrawCall != null)
            {
                NGUITools.DestroyImmediate(uidrawCall.gameObject);
            }
        }
        this.mDrawCalls.Clear();
        this.mChanged.Clear();
    }
Esempio n. 10
0
 private void Delete(ref UIDrawCall.Iterator iter)
 {
     if (iter.Has)
     {
         UIDrawCall current = iter.Current;
         if (object.ReferenceEquals(current, this.mDrawCalls))
         {
             this.mDrawCalls = iter.Next.Current;
         }
         iter = iter.Next;
         current.LinkedList__Remove();
         this.mDrawCallCount--;
         NGUITools.DestroyImmediate(current.gameObject);
     }
 }
Esempio n. 11
0
    private void OnDisable()
    {
        int num = mDrawCalls.size;

        while (num > 0)
        {
            UIDrawCall uIDrawCall = mDrawCalls.buffer[--num];
            if (uIDrawCall != null)
            {
                NGUITools.DestroyImmediate(uIDrawCall.gameObject);
            }
        }
        mDrawCalls.Clear();
        mChanged.Clear();
    }
Esempio n. 12
0
 public void Not()
 {
     try
     {
         if (doSomething != null)
         {
             doSomething(false);
         }
         doSomething = null;
         NGUITools.DestroyImmediate(gameObject);
     }
     catch (System.Exception ex)
     {
         ArkCrossEngine.LogicSystem.LogErrorFromGfx("Exception {0}\n{1}", ex.Message, ex.StackTrace);
     }
 }
Esempio n. 13
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();
    }
Esempio n. 14
0
    private void OnDisable()
    {
        var size = mDrawCalls.size;

        while (size > 0)
        {
            var call = mDrawCalls.buffer[--size];
            if (call != null)
            {
                NGUITools.DestroyImmediate(call.gameObject);
            }
        }

        mDrawCalls.Clear();
        mChanged.Clear();
    }
Esempio n. 15
0
 /// <summary>
 /// 清理玩家
 /// </summary>
 public void CleanPlayer()
 {
     CleanHandCards();
     if (mBasePlayerInfo != null)
     {
         NGUITools.DestroyImmediate(mBasePlayerInfo.gameObject);
         mBasePlayerInfo = null;
     }
     mCathecticCoinLabel.text = "";
     mCardType.gameObject.SetActive(false);
     mCathecticCoinLabel.gameObject.SetActive(false);
     mTxtChatSp.gameObject.SetActive(false);
     mYYVoiceAnim.gameObject.SetActive(false);
     mZhuangSp.gameObject.SetActive(false);
     SeatId = 0;
 }
Esempio n. 16
0
 //清空
 public void ClearItem()
 {
     if (itemList != null)
     {
         foreach (UnityEngine.GameObject go in itemList)
         {
             NGUITools.DestroyImmediate(go);
         }
         if (itemList.Count > 0)
         {
             itemList.Clear();
         }
     }
     ActiveView(upItem, outPos);
     ActiveView(downItem, outPos);
 }
Esempio n. 17
0
 private void OnDisable()
 {
     this.depthStart  = Int32.MaxValue;
     this.depthEnd    = Int32.MinValue;
     this.panel       = (UIPanel)null;
     this.manager     = (UIPanel)null;
     this.mMaterial   = (Material)null;
     this.mTexture    = (Texture)null;
     this.clipTexture = (Texture2D)null;
     if (this.mRenderer != (UnityEngine.Object)null)
     {
         this.mRenderer.sharedMaterials = new Material[0];
     }
     NGUITools.DestroyImmediate(this.mDynamicMat);
     this.mDynamicMat = (Material)null;
 }
 private void OnDisable()
 {
     this.depthStart  = 2147483647;
     this.depthEnd    = -2147483648;
     this.panel       = null;
     this.manager     = null;
     this.mMaterial   = null;
     this.mTexture    = null;
     this.clipTexture = null;
     if (this.mRenderer != null)
     {
         this.mRenderer.set_sharedMaterials(new Material[0]);
     }
     NGUITools.DestroyImmediate(this.mDynamicMat);
     this.mDynamicMat = null;
 }
Esempio n. 19
0
 private void OnDisable()
 {
     depthStart  = 2147483647;
     depthEnd    = -2147483648;
     panel       = null;
     manager     = null;
     mMaterial   = null;
     mTexture    = null;
     clipTexture = null;
     if (mRenderer != null)
     {
         mRenderer.sharedMaterials = new Material[0];
     }
     NGUITools.DestroyImmediate(mDynamicMat);
     mDynamicMat = null;
 }
Esempio n. 20
0
    /// <summary>
    /// Destroy the specified draw call.
    /// </summary>

    static public void Destroy(UIDrawCall dc)
    {
        if (Application.isPlaying)
        {
            if (mActiveList.Remove(dc))
            {
                NGUITools.SetActive(dc.gameObject, false);
                mInactiveList.Add(dc);
            }
        }
        else
        {
            mActiveList.Remove(dc);
            NGUITools.DestroyImmediate(dc.gameObject);
        }
    }
Esempio n. 21
0
 // Token: 0x060004FC RID: 1276 RVA: 0x000309E0 File Offset: 0x0002EBE0
 private void OnDisable()
 {
     this.depthStart  = int.MaxValue;
     this.depthEnd    = int.MinValue;
     this.panel       = null;
     this.manager     = null;
     this.mMaterial   = null;
     this.mTexture    = null;
     this.clipTexture = null;
     if (this.mRenderer != null)
     {
         this.mRenderer.sharedMaterials = new Material[0];
     }
     NGUITools.DestroyImmediate(this.mDynamicMat);
     this.mDynamicMat = null;
 }
Esempio n. 22
0
 // Token: 0x060004F4 RID: 1268 RVA: 0x0002FDE0 File Offset: 0x0002DFE0
 private Material RebuildMaterial()
 {
     NGUITools.DestroyImmediate(this.mDynamicMat);
     this.CreateMaterial();
     this.mDynamicMat.renderQueue = this.mRenderQueue;
     if (this.mRenderer != null)
     {
         this.mRenderer.sharedMaterials = new Material[]
         {
             this.mDynamicMat
         };
         this.mRenderer.sortingLayerName = this.mSortingLayerName;
         this.mRenderer.sortingOrder     = this.mSortingOrder;
     }
     return(this.mDynamicMat);
 }
Esempio n. 23
0
    /// <summary>
    /// Rebuild the draw call's material.
    /// </summary>

    Material RebuildMaterial()
    {
        // Destroy the old material
        NGUITools.DestroyImmediate(mDynamicMat);

        // Create a new material
        CreateMaterial();

        // Material's render queue generally begins at 3000
        mDynamicMat.renderQueue = ((mMaterial != null) ? mMaterial.renderQueue : 3000) + mRenderQueue;
        mLastClip = mClipping;

        // Assign the main texture
        if (mTexture != null)
        {
            mDynamicMat.mainTexture = mTexture;
        }

        // Update the renderer
        if (mRenderer != null)
        {
            mRenderer.sharedMaterials = new Material[] { mDynamicMat }
        }
        ;
        return(mDynamicMat);
    }

    /// <summary>
    /// Update the renderer's materials.
    /// </summary>

    void UpdateMaterials()
    {
        // If clipping should be used, we need to find a replacement shader
        if (mRebuildMat || mDynamicMat == null || mClipping != mLastClip)
        {
            RebuildMaterial();
            mRebuildMat = false;
        }
        else if (mRenderer.sharedMaterial != mDynamicMat)
        {
#if UNITY_EDITOR
            Debug.LogError("Hmm... This point got hit!");
#endif
            mRenderer.sharedMaterials = new Material[] { mDynamicMat };
        }
    }
Esempio n. 24
0
 private Material RebuildMaterial()
 {
     NGUITools.DestroyImmediate(mDynamicMat);
     CreateMaterial();
     mDynamicMat.renderQueue = mRenderQueue;
     if (mTexture != null)
     {
         mDynamicMat.mainTexture = mTexture;
     }
     if (mRenderer != null)
     {
         mRenderer.sharedMaterials = new Material[1] {
             mDynamicMat
         };
     }
     return(mDynamicMat);
 }
Esempio n. 25
0
    private static int DestroyImmediate(IntPtr L)
    {
        int result;

        try
        {
            ToLua.CheckArgsCount(L, 1);
            UnityEngine.Object obj = ToLua.CheckUnityObject(L, 1, typeof(UnityEngine.Object));
            NGUITools.DestroyImmediate(obj);
            result = 0;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }
Esempio n. 26
0
    /// <summary>
    /// Destroy all draw calls we've created when this script gets disabled.
    /// </summary>

    void OnDisable()
    {
        mParent = null;

        for (int i = mDrawCalls.size; i > 0;)
        {
            UIDrawCall dc = mDrawCalls.buffer[--i];

            if (dc != null)
            {
                UIDrawCall.list.Remove(dc);
                NGUITools.DestroyImmediate(dc.gameObject);
            }
        }
        mDrawCalls.Clear();
        list.Remove(this);
    }
Esempio n. 27
0
    /// <summary>
    /// Rebuild the draw call's material.
    /// </summary>

    Material RebuildMaterial()
    {
        // Destroy the old material
        NGUITools.DestroyImmediate(mDynamicMat);

        // Create a new material
        CreateMaterial();
        mDynamicMat.renderQueue = mRenderQueue;

        // Update the renderer
        if (mRenderer != null)
        {
            mRenderer.sharedMaterials  = new Material[] { mDynamicMat };
            mRenderer.sortingLayerName = mSortingLayerName;
            mRenderer.sortingOrder     = mSortingOrder;
        }
        return(mDynamicMat);
    }
Esempio n. 28
0
    /// <summary>
    /// Clear all draw calls.
    /// </summary>

    static public void ClearAll()
    {
        bool playing = Application.isPlaying;

        for (int i = mActiveList.size; i > 0;)
        {
            UIDrawCall dc = mActiveList[--i];
            if (playing)
            {
                NGUITools.SetActive(dc.gameObject, false);
            }
            else
            {
                NGUITools.DestroyImmediate(dc.gameObject);
            }
        }
        mActiveList.Clear();
    }
Esempio n. 29
0
 private Material RebuildMaterial()
 {
     NGUITools.DestroyImmediate(this.mDynamicMat);
     this.CreateMaterial();
     this.mDynamicMat.renderQueue = this.mRenderQueue;
     if (this.mTexture != null)
     {
         this.mDynamicMat.mainTexture = this.mTexture;
     }
     if (this.mRenderer != null)
     {
         this.mRenderer.sharedMaterials = new Material[]
         {
             this.mDynamicMat
         };
     }
     return(this.mDynamicMat);
 }
Esempio n. 30
0
    private void CreateIcon(GameWebAPI.RespDataMA_ChipM.Chip masterChip, GameObject goEmpty)
    {
        Action <UnityEngine.Object> actEnd = delegate(UnityEngine.Object obj)
        {
            GameObject gameObject = UnityEngine.Object.Instantiate(obj) as GameObject;
            gameObject.transform.SetParent(goEmpty.transform.parent);
            gameObject.transform.localPosition = goEmpty.transform.localPosition;
            gameObject.transform.localScale    = new Vector3(0.92f, 0.92f, 1f);
            UIWidget        component  = goEmpty.GetComponent <UIWidget>();
            DepthController component2 = gameObject.GetComponent <DepthController>();
            component2.AddWidgetDepth(component.depth);
            ChipIcon component3 = gameObject.GetComponent <ChipIcon>();
            component3.SetData(masterChip, -1, -1);
            NGUITools.DestroyImmediate(goEmpty);
        };

        AssetDataMng.Instance().LoadObjectASync("UICommon/ListParts/ListPartsChip", actEnd);
    }