private void OnDisable()
 {
     jump.Disable();
     attack.Disable();
     cast.Disable();
     dash.Disable();
 }
Exemplo n.º 2
0
    private void DisableInputsActions()
    {
        miMovimiento.performed -= Movimiento;
        miMovimiento.Disable();

        miDisparo.performed -= MakeLaunch;
        miDisparo.Disable();
    }
Exemplo n.º 3
0
 private void OnDisable()
 {
     MovementAction.Disable();
     SwordAction.Disable();
     GunAction.Disable();
     DodgeAction.Disable();
     UseAction.Disable();
     PauseAction.Enable();
 }
Exemplo n.º 4
0
 /// <summary>
 /// Picks up flag.
 /// </summary>
 public void PickUpFlag()
 {
     fireAction.Disable();
     foreach (var weapon in weapons)
     {
         weapon.gameObject.SetActive(false);
     }
     weapons[currentWeapon].enabled = false;
     flagObject.SetActive(true);
 }
Exemplo n.º 5
0
        private void InitiateSneeze(DashSettings sneezeDashSettings, Vector2 input)
        {
            movementState.Velocity = Vector2.zero;

            Movement.Pulse(ref movementState, sneezeDashSettings.movementSettings, input);

            playerRigidbody.velocity = movementState.Velocity;

            playerState             = Player.PlayerState.Sneezing;
            this.sneezeDashSettings = sneezeDashSettings;
            sneezeAnimation.Activate();
            fireAction?.Disable();
            aimAction?.Disable();
        }
 void OnDisable()
 {
     rightClickIA.Disable();
     rotationIA.Disable();
     movementIA.Disable();
     scrollIA.Disable();
 }
 private void OnDisable()
 {
     moveAxisAction.Disable();
     jumpButtonAction.Disable();
     slashButtonAction.Disable();
     debugButtonAction.Disable();
 }
Exemplo n.º 8
0
 private void OnDisable()
 {
     LevelBossController.OnBossFightEnd -= HandleOnBossFightEnd;
     inputSkipCutscene.performed        -= SkipStartBossCutscene;
     inputSkipCutscene.performed        -= SkipEndBossCutscene;
     inputSkipCutscene.Disable();
 }
 private void OnDisable()
 {
     axisAction.Disable();
     axisAction.performed -= UpdateAxis;
     axisAction.started   -= UpdateAxis;
     axisAction.cancelled -= UpdateAxis;
 }
Exemplo n.º 10
0
    private void OnDisable()
    {
        m_keyboardAction.Disable();
        m_mouseAction.Disable();

        Keyboard.current.onTextInput -= new Action <char>(RecordKey);
    }
Exemplo n.º 11
0
        public void EndGame()
        {
            //Set gamePlaying to false.
            gamePlaying = false;

            //Destroy Bloopy game object to stop player falling.
            Destroy(player.gameObject);

            //If height is a new high score
            if (height > saveData.highScore)
            {
                //Set new high score.
                saveData.SetHighScore((int)height);
                //Save new high score.
                SaveSystem.singleton.SaveGame(saveData);
            }

            //Hide HUD height display from view.
            heightDisplay.gameObject.SetActive(false);

            //Display endGamePanel.
            endGamePanel.SetActive(true);

            //Disable gameplay input actions.
            interactAction.Disable();
            platformPositionAction.Disable();
        }
Exemplo n.º 12
0
    void RemapButtonClicked(InputAction actionToRebind, bool isAlt, string controlType, int specificTarget = -1)
    {
        int target = (specificTarget == -1 ? (isAlt ? 1 : 0) : specificTarget);

        Debug.Log("Target to rebind " + target);
        actionToRebind.Disable();
        inputText.text = string.Format(Localization.GetString("uiStrings", "ui_input_rebind"), actionToRebind.name);
        rebindScreen.SetActive(true);
        var rebindOperation = actionToRebind.PerformInteractiveRebinding()
                              // To avoid accidental input from mouse motion
                              //.WithControlsExcluding("Mouse")
                              .WithTargetBinding(target)
                              .WithExpectedControlType(controlType)
                              .OnMatchWaitForAnother(0.1f)
                              .OnComplete(
            operation =>
        {
            Debug.Log($"Rebound '{actionToRebind}' to '{operation.selectedControl}'");
            operation.Dispose();
            StopRebind(actionToRebind);
        });

        /*if (excludeMouse)
         *  rebindOperation.WithControlsExcluding("Mouse");*/

        rebindOperation.Start();
    }
    private void OnDisable()
    {
        // Right Hand

        _rightHandTrigger.Disable();
        _rightHandGrip.Disable();

        _rightHandTrigger.performed -= RightTriggerPressed;
        _rightHandTrigger.canceled  -= RightTriggerReleased;

        _rightHandGrip.performed -= RightGripPressed;
        _rightHandGrip.canceled  -= RightGripReleased;

        _rightHandSecondary.performed -= RightSecondaryButtonPressed;
        _rightHandSecondary.canceled  -= RightSecondaryButtonReleased;

        // Left Hand

        _leftHandTrigger.Disable();
        _leftHandGrip.Disable();

        _leftHandTrigger.performed -= LeftTriggerPressed;
        _leftHandTrigger.canceled  -= LeftTriggerReleased;

        _leftHandGrip.performed -= LeftGripPressed;
        _leftHandGrip.canceled  -= LeftGripReleased;
    }
Exemplo n.º 14
0
    private void OnDisable()
    {
        if (controllerTypeAction != null)
        {
            controllerTypeAction.Disable();
            controllerTypeAction.performed -= UpdateType;
            controllerTypeAction.started   -= UpdateType;
            controllerTypeAction.canceled  -= UpdateType;
        }

        if (controllerDoFAction != null)
        {
            controllerDoFAction.Disable();
            controllerDoFAction.performed -= UpdateDoF;
            controllerDoFAction.started   -= UpdateDoF;
            controllerDoFAction.canceled  -= UpdateDoF;
        }

        if (controllerCalibrationAccuracyAction != null)
        {
            controllerCalibrationAccuracyAction.Disable();
            controllerCalibrationAccuracyAction.performed -= UpdateCalibrationAccuracy;
            controllerCalibrationAccuracyAction.started   -= UpdateCalibrationAccuracy;
            controllerCalibrationAccuracyAction.canceled  -= UpdateCalibrationAccuracy;
        }
    }
 private void OnDisable()
 {
     _jumpAction.Disable();
     _moveAction.Disable();
     _shootAction.Disable();
     _mouseAction.Disable();
 }
        public static void Release(InputAction action, Action <InputAction.CallbackContext> onPerformed)
        {
            if (action == null || onPerformed == null)
            {
                Debug.LogWarning($"Cannot release InputAction, either action or callback is null");
                return;
            }

            if (!m_Mappings.ContainsKey(action))
            {
                Debug.LogWarning($"Tried to release action {action.name} that was not already registered");
            }
            else
            {
                // Remove entry if present
                if (m_Mappings[action].Contains(onPerformed))
                {
                    action.performed -= onPerformed;
                    m_Mappings[action].Remove(onPerformed);
                }

                // If no more callbacks registered, remove entry and disable action.
                if (m_Mappings[action].Count == 0)
                {
                    action.Disable();
                    m_Mappings.Remove(action);
                }
            }
        }
Exemplo n.º 17
0
        private void OnDestroy()
        {
            FireAction.Disable();

            FireAction.started  -= FireEnable;
            FireAction.canceled -= FireDisable;
        }
Exemplo n.º 18
0
 private void OnDisable()
 {
     _showConsole = false;
     toggleDebugAction.Disable();
     returnAction.Disable();
     debugActionMap.Disable();
 }
Exemplo n.º 19
0
 private void OnDisable()
 {
     keys.Disable();
     mouse.Disable();
     interaction.Disable();
     kill_.Disable();
 }
 void Awake()
 {
     m_CharacterController = GetComponent <CharacterController>();
     m_RunningAction       = m_InputActionAsset["Run Action"];
     m_InputActionAsset["Jump Action"].performed += OnJump;
     m_MovingAction = m_InputActionAsset["Walk Navigation Action"];
     m_StepCycle    = 0f;
     m_NextStep     = m_StepCycle / 2f;
     m_Jumping      = false;
     m_Rigidbody    = GetComponent <Rigidbody>();
     m_DisposeOnDestroy.Add(m_BoundsGetter            = UISelectorFactory.createSelector <Bounds>(ProjectContext.current, "zoneBounds"));
     m_DisposeOnDestroy.Add(m_WalkInstructionSelector = UISelectorFactory.createSelector <IWalkInstructionUI>(WalkModeContext.current, nameof(IWalkModeDataProvider.instruction)));
     m_DisposeOnDestroy.Add(UISelectorFactory.createSelector <bool>(NavigationContext.current, nameof(INavigationDataProvider.moveEnabled),
                                                                    data =>
     {
         if (data)
         {
             m_MovingAction.Enable();
         }
         else
         {
             m_MovingAction.Disable();
         }
     }));
 }
 void OnDisable()
 {
     vector3Action.Disable();
     vector3Action.performed -= UpdateVector3;
     vector3Action.started   -= UpdateVector3;
     vector3Action.cancelled -= UpdateVector3;
 }
Exemplo n.º 22
0
 void disableInputActions()
 {
     jumpAction.Disable();
     slideAction.Disable();
     moveLeftAction.Disable();
     moveRightAction.Disable();
 }
 void OnDisable()
 {
     IntegerAction.Disable();
     IntegerAction.performed -= UpdateInteger;
     IntegerAction.started   -= UpdateInteger;
     IntegerAction.cancelled -= UpdateInteger;
 }
Exemplo n.º 24
0
 private void OnDisable()
 {
     deathCount++;
     movementAction.Disable();
     jumpAction.Disable();
     crouchAction.Disable();
 }
 private void OnDestroy()
 {
     pitchInput.Disable();
     yawInput.Disable();
     boostInput.Disable();
     pauseInput.Disable();
 }
Exemplo n.º 26
0
        protected override void OnStopRunning()
        {
            _mouseAction.Disable();
            //_lookAction.Disable();
            _moveAction.Disable();

            foreach (var c in _customActions)
            {
                c.Disable();
            }

            _customInputs.Dispose();

            foreach (var c in _customSticksInputActions)
            {
                c.Disable();
            }

            _customSticksInputs.Dispose();

            var perkStickControls = InputSystem.devices.FirstOrDefault(x => x is CustomDevice);

            if (perkStickControls != null)
            {
                InputSystem.RemoveDevice(perkStickControls);
            }
        }
Exemplo n.º 27
0
 void OnDisable()
 {
     quaternionAction.Disable();
     quaternionAction.performed -= UpdateQuaternion;
     quaternionAction.started   -= UpdateQuaternion;
     quaternionAction.cancelled -= UpdateQuaternion;
 }
Exemplo n.º 28
0
 public void OnDisable()
 {
     moveAction.Disable();
     lookAction.Disable();
     fireAction.Disable();
     jumpAction.Disable();
 }
Exemplo n.º 29
0
 /// <summary>
 /// 모든 Input을 비활성화합니다.
 /// </summary>
 public void DisableInput()
 {
     moveAction.Disable();
     jumpAction.Disable();
     attackAction.Disable();
     interactAction.Disable();
 }
Exemplo n.º 30
0
    // Update is called once per frame
    void Update()
    {
        pressed = south.isPressed;
        if (controller.buttonNorth.isPressed)
        {
            north = true;
        }
        if (controller.buttonWest.wasPressedThisFrame)
        {
            west = !west;
        }
        if (controller.buttonEast.wasReleasedThisFrame)
        {
            east = !east;
            if (east)
            {
                testAction.Enable();
            }
            else
            {
                testAction.Disable();
            }
        }



        if (testAction.triggered)
        {
            Pause();
        }
    }