Table of Contents

Class InputEventPool<TEventType>

Namespace
Stride.Input
Assembly
Stride.Input.dll

Pools input events of a given type

public static class InputEventPool<TEventType> where TEventType : InputEvent, new()

Type Parameters

TEventType

The type of event to pool

Inheritance
InputEventPool<TEventType>

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

int

Methods

Enqueue(TEventType)

Puts a used event back into the pool to be recycled

public static void Enqueue(TEventType item)

Parameters

item TEventType

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

device IInputDevice

The device that generates this event

Returns

TEventType

An event