| GameObjectCreateEventT Method |
Defines a game object event.
Namespace: DigitalRune.GameAssembly: DigitalRune.Game (in DigitalRune.Game.dll) Version: 1.4.0.0 (1.4.0.14427)
Syntax public static GameEventMetadata<T> CreateEvent<T>(
string name,
string category,
string description,
T defaultEventArgs
)
where T : EventArgs
Public Shared Function CreateEvent(Of T As EventArgs) (
name As String,
category As String,
description As String,
defaultEventArgs As T
) As GameEventMetadata(Of T)
public:
generic<typename T>
where T : EventArgs
static GameEventMetadata<T>^ CreateEvent(
String^ name,
String^ category,
String^ description,
T defaultEventArgs
)
static member CreateEvent :
name : string *
category : string *
description : string *
defaultEventArgs : 'T -> GameEventMetadata<'T> when 'T : EventArgs
Parameters
- name
- Type: SystemString
The name. - category
- Type: SystemString
The category. - description
- Type: SystemString
The description. - defaultEventArgs
- Type: T
The default event arguments that are used when the event is raised without custom event
arguments.
Type Parameters
- T
- The type of the event arguments.
Return Value
Type:
GameEventMetadataTThe event metadata.
Exceptions Remarks
Game object events must be defined using this method before they can be used. Events are
identified by name and type. If an event with the given name and type
T has already been defined, the metadata of the existing event is
returned and the other parameters (category,
description and defaultEventArgs) are ignored!
See Also