FairyGUI.UpdateContext.Begin C# (CSharp) Method

Begin() public method

public Begin ( ) : void
return void
        public void Begin()
        {
            current = this;

            frameId++;
            if (frameId == 0)
                frameId = 1;
            renderingOrder = 0;
            batchingDepth = 0;
            rectMaskDepth = 0;
            stencilReferenceValue = 0;
            alpha = 1;
            grayed = false;

            clipped = false;
            _clipStack.Clear();

            Stats.ObjectCount = 0;
            Stats.GraphicsCount = 0;

            _tmpBegin = OnBegin;
            OnBegin = null;

            //允许OnBegin里再次Add,这里没有做死锁检查
            while (_tmpBegin != null)
            {
                _tmpBegin.Invoke();
                _tmpBegin = OnBegin;
                OnBegin = null;
            }

            working = true;
        }

Usage Example

示例#1
0
        internal void InternalUpdate()
        {
            HandleEvents();

            _updateContext.Begin();
            Update(_updateContext);
            _updateContext.End();

            if (DynamicFont.textRebuildFlag)
            {
                //字体贴图更改了,重新渲染一遍,防止本帧文字显示错误
                _updateContext.Begin();
                Update(_updateContext);
                _updateContext.End();

                DynamicFont.textRebuildFlag = false;
            }
        }
All Usage Examples Of FairyGUI.UpdateContext::Begin