コード例 #1
0
        public void Update(DateTime tickStopwatch, Vector3 shootCoord, Vector3 shootCoordSnap, Vector3 shootMissileCoord, Ped ped, Entity missileTarget)
        {
            _lastTickTime = tickStopwatch;


            if (_gameState.IsInCharacterSelectionMenu)
            {
                //Reset
                _controllerEmulation.DeltaX = 0;
                _controllerEmulation.DeltaY = 0;
            }
            else if (_gameState.IsInRadialMenu)
            {
                _radialMenu.Update();
            }
            else
            {
                //Reset
                _controllerEmulation.DeltaX = 0;
                _controllerEmulation.DeltaY = 0;

                _extendedView.Update();
            }

            ProcessSettingsMenu();

            ProcessAimAtGaze(_settings.SnapAtTargetsEnabled ? shootCoordSnap : shootCoord);

            //Place crosshair in the center of the screen in some cases
            var gazeShootCoord  = shootCoord;
            var crosshairCoord  = ProcessShootCoord(shootCoord);
            var isShootAtCenter = gazeShootCoord == shootCoord;

            ProcessFireAtGaze(crosshairCoord, gazeShootCoord);

            ProcessIncinerateAtGaze(shootCoordSnap);

            ProcessTaseAtGaze(shootCoordSnap);

            ProcessMissileAtGaze(shootMissileCoord, missileTarget);

            _aiming.Update(crosshairCoord, missileTarget, isShootAtCenter);
        }