InputEventPool<TEventType> Class
Namespace: Stride.InputAssembly: Stride.Input.dll
Pools input events of a given type
System.Object →
InputEventPool<TEventType>
Derived from InputEventPool<TEventType>:
public static class InputEventPool<TEventType>
where TEventType : InputEvent, new()
Type Parameters
| Name | Description |
|---|---|
| TEventType | The type of event to pool |
| Name | Description | |
|---|---|---|
| Properties | ||
| ActiveObjects | The number of events in circulation, if this number keeps increasing, Enqueue is possible not called somewhere |
|
| Methods | ||
| Enqueue(TEventType) | Puts a used event back into the pool to be recycled |
|
| GetOrCreate(IInputDevice) | Retrieves a new event that can be used, either from the pool or a new instance |
|
Properties
ActiveObjects
The number of events in circulation, if this number keeps increasing, Enqueue is possible not called somewhere
public static int ActiveObjects { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Methods
Enqueue(TEventType)
Puts a used event back into the pool to be recycled
public static void Enqueue(TEventType item)
Parameters
| Type | Name | Description |
|---|---|---|
| TEventType | item | The event to reuse |
GetOrCreate(IInputDevice)
Retrieves a new event that can be used, either from the pool or a new instance
public static TEventType GetOrCreate(IInputDevice device)
Parameters
| Type | Name | Description |
|---|---|---|
| IInputDevice | device | The device that generates this event |
Returns
| Type | Description |
|---|---|
| TEventType | An event |