示例#1
0
	void OnDisable(){
		if (isHorizontal) {
			InputHandler.LeftStickEvent().horizontalAnalogEvent.becameActive -= Move;
			InputHandler.DPadEvent ().horizontalAnalogEvent.becameActive -= Move;
		} else {
			InputHandler.LeftStickEvent().verticalAnalogEvent.becameActive -= Move;
			InputHandler.DPadEvent().verticalAnalogEvent.becameActive -= Move;
		}

		InputHandler.AEvent().becameActive -= Activate;
	}
示例#2
0
    void OnDisable()
    {
        InputHandler.LeftStickEvent().horizontalAnalogEvent.becameActive -= MoveHorizontally;
        InputHandler.LeftStickEvent().verticalAnalogEvent.becameActive -= MoveVertically;

        InputHandler.DPadEvent().horizontalAnalogEvent.becameActive -= MoveHorizontally;
        InputHandler.DPadEvent().verticalAnalogEvent.becameActive -= MoveVertically;

        InputHandler.BEvent().becameActive -= Return;
        InputHandler.AEvent().becameActive -= Activate;
    }
示例#3
0
	void OnEnable(){
		UpdateButtonsEnabled ();
		if (isHorizontal) {
			InputHandler.LeftStickEvent().horizontalAnalogEvent.becameActive += Move;
			InputHandler.DPadEvent ().horizontalAnalogEvent.becameActive += Move;
		} else {
			InputHandler.LeftStickEvent().verticalAnalogEvent.becameActive += Move;
			InputHandler.DPadEvent().verticalAnalogEvent.becameActive += Move;
		}

		InputHandler.AEvent().becameActive += Activate;
	}
示例#4
0
    void Start()
    {
        InputHandler.StartEvent().becameActive   += TriggerPauseMenu;
        InputHandler.LeftTriggerEvent().getValue += actions.AdjustMovementBehavior;
        InputHandler.LeftStickEvent().getValue   += actions.Movement;
        InputHandler.AEvent().becameActive       += Jump;
        InputHandler.YEvent().becameActive       += CheckItemUsage;
        InputHandler.BEvent().becameActive       += CheckForDodge;
        InputHandler.XEvent().becameActive       += Attack;

        InputHandler.LBEvent().becameActive += HotbarNavigationLeft;
        InputHandler.RBEvent().becameActive += HotbarNavigationRight;

        InputHandler.RightTriggerEvent().becameActive += ChangeHotbar;
    }
示例#5
0
    void OnTriggerExit(Collider col)
    {
        Interactive i = col.GetComponent <Interactive> ();

        if (i != null)
        {
            if (i as AutomaticStructure != null)
            {
                i.OnInteract();
            }

            interactables.Remove(col.GetComponent <Interactive> ());

            if (interactables.Count == 0)
            {
                InputHandler.AEvent().becameActive -= Interact;
                InputHandler.AEvent().becameActive += PlayerController.instance.Jump;
            }
        }
    }