Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    InputEventPool<TEventType> Class

    Namespace: Stride.Input
    Assembly: 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

    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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


    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation