Click or drag to resize

InputMapper Class

A class that simplifies the process of remapping controls. Handles listening for controller input, conflict checking, and creating Action-element assignments.
Inheritance Hierarchy
SystemObject
  RewiredInputMapper

Namespace: Rewired
Assembly: Rewired_Core (in Rewired_Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public sealed class InputMapper

The InputMapper type exposes the following members.

Constructors
 NameDescription
Public methodInputMapper Creates a new InputMapper.
Top
Properties
 NameDescription
Public propertyStatic memberDefault 
Public propertymappingContext Gets the mapping Context object. This allows you to see the current mapping context being used while the mapper is listening. You cannot change any settings in the mapping context. To change mapping contexts, restart input mapper with a new context. If the mapper is idle, this value will be null.
Public propertyoptions Gets the Options object. Configure settings here. If set to null, the default Options will be used instead. Changing this or any values in Options while the mapper is listening will have no effect until the mapper is started again.
Public propertystatus The current status of the mapper.
Public propertytimeRemaining The time remaining before the mapper times out. Always returns 0 if no timeout was set or if the timer was stopped.
Top
Methods
 NameDescription
Public methodClear Stops the mapper and clears all event listeners, callbacks, and Options.
Public methodRemoveAllEventListeners Removes all event listeners from all events.
Public methodRemoveEventListeners Removes the event listener(s) from all events. You can pass the object that contains the target delegates to unsubscribe all delegates in that object from all events. For example, if your class MyClass subscribes to several events, you can pass the MyClass object into this method to remove all of its listeners. Example: mapper.RemoveEventListeners(this);
Public methodStart Starts listening for input.
Public methodStop Stops listening for input.
Top
Events
 NameDescription
Public eventCanceledEvent Event that is triggered when listening is canceled.
Public eventConflictFoundEvent Event that is triggered when an assignment conflict is found.
Public eventErrorEvent Event that is triggered an error occurs.
Public eventInputMappedEvent Event that is triggered when an input assignment is made.
Public eventStartedEvent Event that is triggered when listening is started.
Public eventStoppedEvent Event that is triggered when listening stops.
Public eventTimedOutEvent Event that is triggered when listening times out.
Top
See Also