1
0
KF2-Dev-Scripts/Engine/Classes/PlayerManagerInteraction.uc
2020-12-13 18:01:13 +03:00

77 lines
3.1 KiB
Ucode

/**
* Responsible for routing input events from the GameViewportClient to the
* appropriate player.
*
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class PlayerManagerInteraction extends Interaction
within GameViewportClient
native(inherit);
cpptext
{
/* === UInteraction interface === */
/**
* Routes an input key event to the player's interactions array
*
* @param Viewport - The viewport which the key event is from.
* @param ControllerId - The controller which the key event is from.
* @param Key - The name of the key which an event occured for.
* @param Event - The type of event which occured.
* @param AmountDepressed - For analog keys, the depression percent.
* @param bGamepad - input came from gamepad (ie xbox controller)
*
* @return True to consume the key event, false to pass it on.
*/
virtual UBOOL InputKey(INT ControllerId,FName Key,EInputEvent Event,FLOAT AmountDepressed=1.f,UBOOL bGamepad=FALSE);
/**
* Routes an axis input event to the player's interactions array.
*
* @param Viewport - The viewport which the axis movement is from.
* @param ControllerId - The controller which the axis movement is from.
* @param Key - The name of the axis which moved.
* @param Delta - The axis movement delta.
* @param DeltaTime - The time since the last axis update.
*
* @return True to consume the axis movement, false to pass it on.
*/
virtual UBOOL InputAxis(INT ControllerId,FName Key,FLOAT Delta,FLOAT DeltaTime, UBOOL bGamepad=FALSE);
/**
* Routes a character input to the player's Interaction array.
*
* @param Viewport - The viewport which the axis movement is from.
* @param ControllerId - The controller which the axis movement is from.
* @param Character - The character.
*
* @return True to consume the character, false to pass it on.
*/
virtual UBOOL InputChar(INT ControllerId,TCHAR Character);
/**
* Process a touchpad touch input event received from the viewport.
*
* @param ControllerId - The controller which the key event is from.
* @param Handle - Identifier unique to this touch event
* @param TouchLocation - Screen position of the touch
* @param DeviceTimestamp - Timestamp of the event
* @param TouchpadIndex - For devices with multiple touchpads, this is the index of which one
* @return True to consume the key event, false to pass it on.
*/
virtual UBOOL InputTouch(INT ControllerId, UINT Handle, ETouchType Type, FVector2D TouchLocation, DOUBLE DeviceTimestamp, UINT TouchpadIndex=0);
/**
* Process a motion event received from the viewport.
*
* @param ControllerId - The controller which the key event is from.
* @param Tilt The current orientation of the device
* @param RotationRate How fast the tilt is changing
* @param Gravity Describes the current gravity of the device
* @param Acceleration Describes the acceleration of the device
* @return True to consume the motion event, false to pass it on.
*/
virtual UBOOL InputMotion(INT ControllerId, const FVector& Tilt, const FVector& RotationRate, const FVector& Gravity, const FVector& Acceleration);
}