Scripting API
Scripting API
InputMap
Class in Abyss.Core, from Abyss.Core.
A map of actions, which a player has on or off as a whole: a game's, a menu's.
public sealed class InputMapProperties
Id
public ulong Id { get; }Its identity, which stays with it as it is renamed and moved.
Name
public string Name { get; internal set; }What it is called, unique among the maps.
Priority
public int Priority { get; set; }Which of two maps that are on and bind one key has it: the higher, for as long as it is on.
Enabled
public bool Enabled { get; set; }Whether a player starts with it on.
Actions
public IReadOnlyList<InputAction> Actions { get; }Its actions, in order.
Methods
Add
public InputAction Add(string name, ActionType type, params ReadOnlySpan<InputBinding> bindings)Adds an action called name after the others, bound as bindings say.
Parameters
nametypebindings
Returns The action added.
Exceptions
ArgumentException: The map has an action so called, the name is blank, or a binding does not fit.
Action
public InputAction? Action(string name)Its action called name, or null.
Parameters
name
Remove
public bool Remove(string name)Takes away its action called name.
Parameters
name
Returns Whether it had one.
AddAction
public InputAction AddAction()Adds an action after the others: New Action, numbered where that is taken, a ActionType.Button with no bindings.
Rename
public string Rename(InputAction action, string name)Calls action name, trimmed and numbered where another of its actions is called that; a name of nothing but spaces leaves it as it was.
Parameters
actionname
Returns What it is called now.
Move
public bool Move(InputAction action, int to)Moves action to to among its actions.
Parameters
actionto
Returns Whether it moved.
Duplicate
public InputAction Duplicate(InputAction action)A copy of action after it, its bindings copied, every identity its own, its name numbered.
Parameters
action
Remove
public bool Remove(InputAction action)Takes action away.
Parameters
action
Returns Whether it was one of its actions.
ToString
public override string ToString()