Update() public method

public Update ( ) : void
return void
Exemplo n.º 1
0
    private void Update()
    {
        ProcessDelayedCallbacks();

        screen.Update();

        touchManager.Update();

        if (SignalUpdate != null)
        {
            SignalUpdate();
        }

        for (int s = 0; s < _stages.Count; s++)
        {
            _stages[s].Redraw(false, _isDepthChangeNeeded);
        }

        _isDepthChangeNeeded = false;

        if (_shouldRunGCNextUpdate)
        {
            _shouldRunGCNextUpdate = false;
            GC.Collect();
        }
    }
Exemplo n.º 2
0
    private void Update()
    {
        screen.Update();

        touchManager.Update();
        if (SignalUpdate != null)
        {
            SignalUpdate();
        }


        for (int s = 0; s < _stages.Count; s++)
        {
            _stages[s].Redraw(false, _isDepthChangeNeeded);
        }

        _isDepthChangeNeeded = false;
    }
    private void Update()
    {
        if (Input.deviceOrientation == DeviceOrientation.LandscapeLeft && _currentOrientation != ScreenOrientation.LandscapeLeft && _futileParams.supportsLandscapeLeft)
        {
            SwitchOrientation(ScreenOrientation.LandscapeLeft);
        }
        else if (Input.deviceOrientation == DeviceOrientation.LandscapeRight && _currentOrientation != ScreenOrientation.LandscapeRight && _futileParams.supportsLandscapeRight)
        {
            SwitchOrientation(ScreenOrientation.LandscapeRight);
        }
        else if (Input.deviceOrientation == DeviceOrientation.Portrait && _currentOrientation != ScreenOrientation.Portrait && _futileParams.supportsPortrait)
        {
            SwitchOrientation(ScreenOrientation.Portrait);
        }
        else if (Input.deviceOrientation == DeviceOrientation.PortraitUpsideDown && _currentOrientation != ScreenOrientation.PortraitUpsideDown && _futileParams.supportsPortraitUpsideDown)
        {
            SwitchOrientation(ScreenOrientation.PortraitUpsideDown);
        }

        if (_didJustResize)
        {
            _didJustResize = false;
            _oldWidth      = Screen.width;
            _oldHeight     = Screen.height;
        }
        else if (_oldWidth != Screen.width || _oldHeight != Screen.height)
        {
            _oldWidth  = Screen.width;
            _oldHeight = Screen.height;

            UpdateScreenDimensions();
            if (SignalResize != null)
            {
                SignalResize(false);
            }
        }

        touchManager.Update();
        if (SignalUpdate != null)
        {
            SignalUpdate();
        }
        stage.Redraw(false, false);
    }
Exemplo n.º 4
0
    private void Update()
    {
        screen.Update();

        if (SignalUpdate != null)
        {
            SignalUpdate();
        }

        touchManager.Update();

        for (int s = 0; s < _stages.Count; s++)
        {
            _stages[s].Redraw(false, _isDepthChangeNeeded);
        }

        _isDepthChangeNeeded = false;

        if (shouldRunGCNextUpdate)
        {
            shouldRunGCNextUpdate = false;
            GC.Collect();
        }
    }