Beispiel #1
0
    private void OnDisable()
    {
        Cursor.lockState = CursorLockMode.Locked;
        Cursor.visible   = false;

        inputControls.UI.Back.performed -= ctx => Back();
        inputControls.Disable();
    }
    private void OnDisable()
    {
        inputControls.Player.Move.performed   -= ctx => CountMovement(ctx.ReadValue <Vector2>());
        inputControls.Player.Jump.performed   -= ctx => FloatingUp();
        inputControls.Player.Crouch.performed -= ctx => FloatingDown();

        inputControls.Disable();
    }
Beispiel #3
0
    private void OnDisable()
    {
        inputControls.Player.Move.performed -= ctx => inputVal = ctx.ReadValue <Vector2>();
        inputControls.Player.Move.canceled  -= ctx => inputVal = Vector3.zero;

        inputControls.Player.Jump.performed -= ctx => isMovingUpPressed = true;
        inputControls.Player.Jump.canceled  -= ctx => isMovingUpPressed = false;

        inputControls.Player.Crouch.performed -= ctx => isMovingDownPressed = true;
        inputControls.Player.Crouch.canceled  -= ctx => isMovingDownPressed = false;

        inputControls.Player.Fire.performed -= ctx => Fire();

        inputControls.Player.Scan.performed -= ctx => Scan();
        inputControls.Player.Scan.canceled  -= ctx => ScanRelease();

        inputControls.Disable();
    }
        // Diables the controls when the player is not active
        private void OnDisable()
        {
            controls.Disable();

            puzzleModeUI.SetActive(false);
            currPiece       = null;
            pieceDetector   = null;
            isFastFall      = false;
            beforeFastFally = 0f;
        }
Beispiel #5
0
 public void ToggleInput(bool toggle)
 {
     if (toggle)
     {
         input.Enable();
     }
     else
     {
         input.Disable();
     }
 }
Beispiel #6
0
 public virtual void willLostFocus()
 {
     foreach (var item in GetComponentsInChildren <UnityEngine.UI.Button>())
     {
         item.interactable = false;
     }
     fingerActive = false;
     inputs.Disable();
     if (needsResetLastSelectedGameObject)
     {
         foreach (var button in this.gameObject.GetComponentsInChildren <UnityEngine.UI.Button>())
         {
             if (button.gameObject == MMX.GameManager.Input.currentSelectedGameObject)
             {
                 currentSelectedGameObjectWhenLostFocus = button.gameObject;
             }
         }
     }
 }
 private void OnDisable()
 {
     _controls.Disable();
     _controls.Player.Move.performed -= MoveHandler;
 }
Beispiel #8
0
 private void OnDisable()
 {
     _controls.Disable();
 }
Beispiel #9
0
 public virtual void Awake()
 {
     inputs = new InputControls();
     inputs.Disable();
 }
Beispiel #10
0
    private void OnDisable()
    {
        inputActions.Disable();

        myBrain.enabled = false;
    }
Beispiel #11
0
 public void willLostFocus()
 {
     base.move(Vector2.zero, Vector2.zero);
     inputs.Disable();
 }
Beispiel #12
0
 private void OnDisable()
 {
     inputControls.UI.Back.performed -= ctx => Back();
     inputControls.Disable();
 }
Beispiel #13
0
 void OnDisable()
 {
     inputAction.Disable();
 }
Beispiel #14
0
 private void OnDisable()
 {
     input.InGame.Pause.performed -= ctx => DeterminePauseState();
     input.Disable();
 }
Beispiel #15
0
 void OnDisable()
 {
     ctrl.Disable();
 }
Beispiel #16
0
 private void OnDisable()
 {
     inputActions.Disable();
 }
Beispiel #17
0
 public void Dispose()
 {
     inputs.Disable();
     inputs = null;
 }