Always snap to grid

UE3:Interaction (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site

Jump to: navigation, search
UT3 Object >> UIRoot >> Interaction

Contents

Package: 
Engine
Known direct subclasses:
Console, DemoKismetInputInteraction, Input, PlayerManagerInteraction, UIInteraction, UTQueryHelper
This class in other games:
UDK, UE2Runtime, UT2003, UT2004

Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.

[edit] Default values

Property Value
OnInitialize Initialized

[edit] Delegates

[edit] OnInitialize

delegate OnInitialize ()

Called from native Init() after native initialization has been performed.

[edit] OnReceivedNativeInputAxis

delegate bool OnReceivedNativeInputAxis (int ControllerId, name Key, float Delta, float DeltaTime, optional bool bGamepad)

Provides script-only child classes the opportunity to handle input axis events received from the viewport. This delegate is ONLY called when input is being routed natively from the GameViewportClient (i.e. NOT when unrealscript calls the InputKey native unrealscript function on this Interaction).

Parameters:

  • ControllerId - the controller that generated this input axis event
  • Key - the name of the axis that moved (KEY_MouseX, KEY_XboxTypeS_LeftX, etc.)
  • Delta - the movement delta for the axis
  • DeltaTime - the time (in seconds) since the last axis update.
  • bGamepad - input came from gamepad (ie xbox controller)

Returns:

return TRUE to indicate that the input event was handled. if the return value is TRUE, the input event will not be processed by this Interaction's native code.

[edit] OnReceivedNativeInputChar

delegate bool OnReceivedNativeInputChar (int ControllerId, string Unicode)

Provides script-only child classes the opportunity to handle character input (typing) events received from the viewport. This delegate is ONLY called when input is being routed natively from the GameViewportClient (i.e. NOT when unrealscript calls the InputKey native unrealscript function on this Interaction).

Parameters:

  • ControllerId - the controller that generated this character input event
  • Unicode - the character that was typed

Returns:

return TRUE to indicate that the input event was handled. if the return value is TRUE, the input event will not be processed by this Interaction's native code.

[edit] OnReceivedNativeInputKey

delegate bool OnReceivedNativeInputKey (int ControllerId, name Key, Object.EInputEvent EventType, optional float AmountDepressed, optional bool bGamepad)

Provides script-only child classes the opportunity to handle input key events received from the viewport. This delegate is ONLY called when input is being routed natively from the GameViewportClient (i.e. NOT when unrealscript calls the InputKey native unrealscript function on this Interaction).

Parameters:

  • ControllerId - the controller that generated this input key event
  • Key - the name of the key which an event occured for (KEY_Up, KEY_Down, etc.)
  • EventType - the type of event which occured (pressed, released, etc.)
  • AmountDepressed - for analog keys, the depression percent.
  • bGamepad - input came from gamepad (ie xbox controller)

Returns:

return TRUE to indicate that the input event was handled. if the return value is TRUE, the input event will not be processed by this Interaction's native code.

[edit] Functions

[edit] Native functions

[edit] Init

native final noexport function Init ()

Called when the interaction is added to the GlobalInteractions array.

[edit] Events

[edit] PostRender

event PostRender (Canvas Canvas)

Called once a frame to allow the interaction to draw to the canvas

Parameters:

  • Canvas - Canvas object to draw to

[edit] Tick

event Tick (float DeltaTime)

Called once a frame to update the interaction's state.

Parameters:

  • DeltaTime - The time since the last frame.

[edit] Other instance functions

[edit] Initialized

function Initialized ()

default handler for OnInitialize delegate. Here so that child classes can override the default behavior easily

[edit] NotifyGameSessionEnded

function NotifyGameSessionEnded ()

Called when the current map is being unloaded. Cleans up any references which would prevent garbage collection.

[edit] NotifyPlayerAdded

function NotifyPlayerAdded (int PlayerIndex, LocalPlayer AddedPlayer)

Called when a new player has been added to the list of active players (i.e. split-screen join)

Parameters:

  • PlayerIndex - the index [into the GamePlayers array] where the player was inserted
  • AddedPlayer - the player that was added

[edit] NotifyPlayerRemoved

function NotifyPlayerRemoved (int PlayerIndex, LocalPlayer RemovedPlayer)

Called when a player has been removed from the list of active players (i.e. split-screen players)

Parameters:

  • PlayerIndex - the index [into the GamePlayers array] where the player was located
  • RemovedPlayer - the player that was removed
Personal tools