Popcorning Guinea Pig
Search Results for

    Show / Hide Table of Contents

    Class InputService

    Concrete implementation of the input service. Manages input contexts, bindings, and command execution through a command pattern system.

    Inheritance
    object
    InputService
    Implements
    IInputService
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: PopcorningGuineaPig.Engine.Services
    Assembly: PopcorningGuineaPig.Engine.dll
    Syntax
    public class InputService : IInputService

    Constructors

    | Edit this page View Source

    InputService()

    Creates a new input service.

    Declaration
    public InputService()

    Methods

    | Edit this page View Source

    AddBinding(string, InputBinding)

    Adds a binding to the specified context.

    Declaration
    public void AddBinding(string contextName, InputBinding binding)
    Parameters
    Type Name Description
    string contextName

    Name of the context to add the binding to

    InputBinding binding

    The input binding to add

    | Edit this page View Source

    ClearBindings(string)

    Clears all bindings from the specified context.

    Declaration
    public void ClearBindings(string contextName)
    Parameters
    Type Name Description
    string contextName

    Name of the context to clear

    | Edit this page View Source

    LoadConfiguration(string)

    Loads input configuration from a file (placeholder implementation).

    Declaration
    public void LoadConfiguration(string filePath)
    Parameters
    Type Name Description
    string filePath

    Path to the configuration file

    | Edit this page View Source

    PopContext(string)

    Removes an input context from the stack.

    Declaration
    public void PopContext(string contextName)
    Parameters
    Type Name Description
    string contextName

    Name of the context to remove

    | Edit this page View Source

    PushContext(string, InputContext)

    Pushes an input context onto the stack.

    Declaration
    public void PushContext(string contextName, InputContext context)
    Parameters
    Type Name Description
    string contextName

    Unique identifier for the context

    InputContext context

    The input context to push

    | Edit this page View Source

    RemoveBinding(string, string)

    Removes a binding from the specified context.

    Declaration
    public void RemoveBinding(string contextName, string bindingId)
    Parameters
    Type Name Description
    string contextName

    Name of the context

    string bindingId

    ID of the binding to remove

    | Edit this page View Source

    SaveConfiguration(string)

    Saves current input configuration to a file (placeholder implementation).

    Declaration
    public void SaveConfiguration(string filePath)
    Parameters
    Type Name Description
    string filePath

    Path to save the configuration file

    | Edit this page View Source

    SetGlobalContext(InputContext)

    Sets the global input context.

    Declaration
    public void SetGlobalContext(InputContext context)
    Parameters
    Type Name Description
    InputContext context

    The global input context

    | Edit this page View Source

    Update(double)

    Updates the input system. Should be called once per frame.

    Declaration
    public void Update(double deltaTime)
    Parameters
    Type Name Description
    double deltaTime

    Time elapsed since last update

    Events

    | Edit this page View Source

    OnCommandExecuted

    Event fired when a command is executed.

    Declaration
    public event Action<string> OnCommandExecuted
    Event Type
    Type Description
    Action<string>
    | Edit this page View Source

    OnInputReceived

    Event fired when an input is received.

    Declaration
    public event Action<InputEvent> OnInputReceived
    Event Type
    Type Description
    Action<InputEvent>

    Implements

    IInputService
    • Edit this page
    • View Source
    In this article
    Back to top © 2024 Popcorning Guinea Pig Game Engine. A custom C# game engine for indie developers.