3DRadSpace  v1.0.0a
Scripting documentation
_3DRadSpaceDll.EventOnKey Class Reference

Allows raising events whenever a key is being pressed. More...

Inheritance diagram for _3DRadSpaceDll.EventOnKey:
_3DRadSpaceDll.GameObject

Public Member Functions

 EventOnKey ()
 Empty EOK constructor. More...
 
 EventOnKey (string name, bool enabled, KeyInput input, uint time_necesarry=0)
 Main EOK constructor. More...
 
override void Update (MouseState mouse, KeyboardState keyboard, GameTime time)
 
- Public Member Functions inherited from _3DRadSpaceDll.GameObject
 GameObject ()
 Default constructor. More...
 
void Enable ()
 Enables object. More...
 
void Disable ()
 Disables object. More...
 
void Toggle ()
 Switches object on/off state. More...
 
void Show ()
 Shows the object. More...
 
void Hide ()
 Hides the object. More...
 
virtual void Load (ContentManager content)
 Loads the resource(s). More...
 
virtual void Draw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection)
 Unloads the resource. More...
 
virtual void EditorDraw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection)
 Object draw code for the 3DRadSpace editor More...
 
virtual void Trigger ()
 This is specific to objects like ExitFade, NetServer,etc More...
 
override bool Equals (object obj)
 Determines whether the specified object is equal to the current object. More...
 
override int GetHashCode ()
 Returns the hash code calculated from a string representing the data inside the object. More...
 
override string ToString ()
 Returns the object's name More...
 
void RunOnce ()
 Runs the object one Update loop. If used on a active object it will be stopped. More...
 

Public Attributes

KeyInput Key
 Defines the key and the expected key state. More...
 
new List< OpCodeCallBehiavours
 The event defined in the editor. More...
 
- Public Attributes inherited from _3DRadSpaceDll.GameObject
Vector3 Position
 Object position More...
 
Vector3 Rotation
 Rotation in a Euler angles system. More...
 
List< int > SelectedObjects
 Used for editor. More...
 

Properties

uint HoldingTime [get, set]
 Defined the time in milliseconds how much time is needed to hold down the given key to trigger the event. More...
 
uint TotalHoldTime [get]
 Defnes how much time the button is being hold. More...
 
- Properties inherited from _3DRadSpaceDll.GameObject
string Name [get, set]
 Object Name. Used as a string identifier. More...
 
object Tag [get, set]
 Tag object. More...
 
bool Enabled [get, set]
 Checks if object is enabled. More...
 
bool Hidden [get, set]
 Checks if object is being drawn. More...
 
List< ObjectBehiavourBehiavours [get, set]
 Relation with other objects More...
 
Quaternion RotationQuaternion [get]
 Rotation in a Quaterion system. More...
 
string Resource [get, set]
 Resource file More...
 

Additional Inherited Members

- Static Public Member Functions inherited from _3DRadSpaceDll.GameObject
static implicit operator bool (GameObject o)
 Checks if the object exists. Same as GameObject != null. More...
 
static bool operator== (GameObject a, GameObject b)
 Checks if two GameObjects are equal. More...
 
static bool operator!= (GameObject a, GameObject b)
 The opposite of the equality operator. More...
 
- Events inherited from _3DRadSpaceDll.GameObject
onDraw OnDraw
 Called when object is being drawn on frame. More...
 
onUpdate OnUpdate
 Called when object is being updated on the update logic loop. More...
 
onObjectDestroy OnRemoval
 Called when object is being deleted. More...
 
onObjectLoad OnObjectLoad
 Called when a object resource is being loaded. More...
 

Detailed Description

Allows raising events whenever a key is being pressed.

Constructor & Destructor Documentation

◆ EventOnKey() [1/2]

_3DRadSpaceDll.EventOnKey.EventOnKey ( )

Empty EOK constructor.

◆ EventOnKey() [2/2]

_3DRadSpaceDll.EventOnKey.EventOnKey ( string  name,
bool  enabled,
KeyInput  input,
uint  time_necesarry = 0 
)

Main EOK constructor.

Parameters
nameObject Name.
enabledWill the event get raised?
inputDefines the key and input type.
time_necesarryTime necessary for holding down the button in order to trigger the button.

Member Function Documentation

◆ Update()

override void _3DRadSpaceDll.EventOnKey.Update ( MouseState  mouse,
KeyboardState  keyboard,
GameTime  time 
)
virtual

Parameters
mouse
keyboard
time

Reimplemented from _3DRadSpaceDll.GameObject.

Member Data Documentation

◆ Behiavours

new List<OpCodeCall> _3DRadSpaceDll.EventOnKey.Behiavours

The event defined in the editor.

◆ Key

KeyInput _3DRadSpaceDll.EventOnKey.Key

Defines the key and the expected key state.

Property Documentation

◆ HoldingTime

uint _3DRadSpaceDll.EventOnKey.HoldingTime
getset

Defined the time in milliseconds how much time is needed to hold down the given key to trigger the event.

◆ TotalHoldTime

uint _3DRadSpaceDll.EventOnKey.TotalHoldTime
get

Defnes how much time the button is being hold.