Пример #1
0
        protected override void SetupPlayerInputComponent(UInputComponent playerInputComponent)
        {
            base.SetupPlayerInputComponent(playerInputComponent);

            // Use R Controller Trigger to process click events
            playerInputComponent.BindAction("TriggerClick", EInputEventType.Pressed, OnTriggerClick);
        }
Пример #2
0
        protected override void SetupPlayerInputComponent(UInputComponent playerInputComponent)
        {
            base.SetupPlayerInputComponent(playerInputComponent);

            // Note: the 'Jump' action and the 'MoveRight' axis are bound to actual keys/buttons/sticks in DefaultInput.ini (editable from Project Settings..Input)
            playerInputComponent.BindAction("Jump", EInputEvent.Pressed, Jump);
            playerInputComponent.BindAction("Jump", EInputEvent.Released, StopJumping);
            playerInputComponent.BindAxis("MoveRight", MoveRight);

            playerInputComponent.BindTouch(EInputEvent.Pressed, TouchStart);
            playerInputComponent.BindTouch(EInputEvent.Released, TouchStopped);
        }
Пример #3
0
 /// <summary>
 /// Is where we bind inputs from input source.
 /// </summary>
 /// <param name="inputComponent">You can bind inputs and axes via this class.</param>
 protected abstract void SetupPlayerInputComponent(UInputComponent inputComponent);