Exemple #1
0
        // Update is called once per frame
        void Update()
        {
            if (!AllowControll)
            {
                return;
            }

            var xUnitMovement  = Input.GetAxis("Horizontal");
            var yScopeMovement = Input.GetAxis("Vertical");
            var isShooting     = Input.GetButton("Fire2");
            var isJumping      = Input.GetButton("Jump");

            UnitMoveScript.ControllCharacter(xUnitMovement, yScopeMovement, isShooting, isJumping);
        }
        // Update is called once per frame
        void Update()
        {
            if (!AllowControll)
            {
                return;
            }

            if (GameObjectsProviderService.CurrentWeaponController.GetCurrentWeapon() == WeaponEnum.None)
            {
                GameObjectsProviderService.CurrentWeaponController.SetCurrentWeapon(UsedWeapon);
            }

            const float xUnitMovement  = 0.0f;
            const float yScopeMovement = 0.0f;
            var         isShooting     = _isShooting;
            const bool  isJumping      = false;

            UnitMoveScript.ControllCharacter(xUnitMovement, yScopeMovement, isShooting, isJumping);
        }