Skip to content

InteractionUIBindings.cs

Matthew Coulter edited this page Aug 17, 2022 · 1 revision

InteractionUIBindings

class/ Inherits from:MonoBehaviour

Description

This class enabled assigning UI sprites to key inputs for the interaction systemDoing so, the user is able to see the key to press to trigger an interaction

Subclasses

Subclass Description
Binding This class defines the link between a key code and the sprite UI for that key

Public Properties

Property Description Type
keyCode; The key code from input manager string
sprite; The sprite which represents that input method Sprite
bindings; The list of bindings between key input and sprite representation (because dictionaries don't show in the inspector!) List

Public Methods

Method Description Returns Parameters Type
GetSprite Get the sprite based on a key code The sprite that represents the key, as long as it has been assigned in the inspector keyCode: The InputManager key identifier Sprite