Пример #1
0
        internal void Update()
        {
            int w, h;

            w = Screen.width;
            h = Screen.height;
            if (w != stageWidth || h != stageHeight)
            {
                stageWidth  = w;
                stageHeight = h;
                AdjustCamera();

                onStageResized.Call();
            }

            if (Input.GetKeyUp(KeyCode.LeftShift) || Input.GetKeyUp(KeyCode.RightShift))
            {
                shiftDown = false;
            }
            else if (Input.GetKeyDown(KeyCode.LeftShift) || Input.GetKeyDown(KeyCode.RightShift))
            {
                shiftDown = true;
            }

            if (touchScreen)
            {
                HandleTouchEvents();
            }
            else
            {
                HandleMouseEvents();
            }

            _updateContext.Reset();
            Update(_updateContext, 1f);
            _engine.ObjectTotal   = (int)DisplayObject._gInstanceCounter;
            _engine.ObjectOnStage = (int)_updateContext.counter;

            onPostUpdate.Call();

            if (inputCaret.active)
            {
                inputCaret.quadBatch.Update(_updateContext, 1f);
                inputCaret.Blink();
            }

            if (highlighter.active)
            {
                highlighter.quadBatch.Update(_updateContext, 1f);
            }
        }