Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 |
// ==================================================================== // Class: Engine.Interaction // // Each individual Interaction is a jumping point in UScript. The should // be the foundatation for any subsystem that requires interaction with // the player (such as a menu). // // Interactions take on two forms, the Global Interaction and the Local // Interaction. The GI get's to process data before the LI and get's // render time after the LI, so in essence the GI wraps the LI. // // A dynamic array of GI's are stored in the InteractionMaster while // each Viewport contains an array of LIs. // // // (c) 2001, Epic Games, Inc. All Rights Reserved // ==================================================================== class Interaction extends Interactions threaded native; var bool bActive; // Is this interaction Getting Input var bool bVisible; // Is this interaction being Displayed var bool bRequiresTick; // Does this interaction require game TICK var bool bNativeEvents; // This interaction requests native events // These entries get filled out upon creation. var Player ViewportOwner; // Pointer to the ViewPort that "Owns" this interaction or none if it's Global var InteractionMaster Master; // Pointer to the Interaction Master //----------------------------------------------------------------------------- // natives. native function Initialize(); // setup the state system and stack frame native function bool ConsoleCommand( coerce string S ); // Executes a console command // IGA >>> function PostBeginPlay() {} // IGA // WorldToScreen converts a vector in the world // ==================================================================== // WorldToScreen - Returns the X/Y screen coordinates in to a viewport of a given vector // in the world. // ==================================================================== native function vector WorldToScreen(vector Location, optional vector CameraLocation, optional rotator CameraRotation); // ==================================================================== // ScreenToWorld - Converts an X/Y screen coordinate in to a world vector // ==================================================================== native function vector ScreenToWorld(vector Location, optional vector CameraLocation, optional rotator CameraRotation); // ==================================================================== // Initialized - Called directly after an Interaction Object has been created // and Initialized. Should be subclassed // ==================================================================== event Initialized(); // ==================================================================== // Message - This event allows interactions to receive messages // ==================================================================== function Message( coerce string Msg, float MsgLife) { } // Message // ==================================================================== // ==================================================================== // Input Routines - These two routines are the entry points for input. They both // return true if the data has been processed and should now discarded. // Both functions should be handled in a subclass of Interaction // ==================================================================== // ==================================================================== function bool KeyType( out EInputKey Key, optional string Unicode ) { return false; } function bool KeyEvent( out EInputKey Key, out EInputAction Action, FLOAT Delta ) { return false; } // ==================================================================== // ==================================================================== // Render Routines - All Interactions recieve both PreRender and PostRender // calls. // Both functions should be handled in a subclass of Interaction // ==================================================================== // ==================================================================== function PreRender( canvas Canvas ); function PostRender( canvas Canvas ); // ==================================================================== // SetFocus - This function cases the Interaction to gain "focus" in the interaction // system. Global interactions's focus superceed locals. // ==================================================================== function SetFocus() { Master.SetFocusTo(self,ViewportOwner); } // SetFocus // ==================================================================== // Tick - By default, Interactions do not get ticked, but you can // simply turn on bRequiresTick. // ==================================================================== function Tick(float DeltaTime); defaultproperties { bActive=True bRequiresTick=False bVisible=False bNativeEvents=False } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |