Hydrogen Framework  1.3.1
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
hInput Class Reference

A drop in implementation of the Hydrogen.Peripherals.Input manager. This simply makes the class an accessible singleton with some very simple additional functionality. More...

+ Inheritance diagram for hInput:

Static Public Member Functions

static bool Exists ()
 Does an Input Manager already exist? More...
 

Public Attributes

bool Persistent = true
 Should this input manager survive scene switches? More...
 

Protected Member Functions

override void Awake ()
 Unity's Awake Event More...
 
- Protected Member Functions inherited from Hydrogen.Peripherals.Input
virtual void Update ()
 

Properties

static hInput Instance [get]
 Gets the input manager instance, creating one if none is found. More...
 

Additional Inherited Members

- Public Member Functions inherited from Hydrogen.Peripherals.Input
bool AddAction (String name, InputAction action)
 
bool RemoveAction (String name, bool alsoRemoveControls)
 
bool AddControl (String controlName, String actionName)
 
void RemoveControl (String controlName)
 
void ClearControls ()
 Clears all controls. More...
 
List< KeyValuePair< string,
string > > 
GetControls ()
 Gets the controls. More...
 
bool SetControls (List< KeyValuePair< string, string >> controlScheme)
 Set the controls from a List<KeyValuePair<string, string>> More...
 

Detailed Description

A drop in implementation of the Hydrogen.Peripherals.Input manager. This simply makes the class an accessible singleton with some very simple additional functionality.

Definition at line 37 of file hInput.cs.

Member Function Documentation

override void hInput.Awake ( )
protectedvirtual

Unity's Awake Event

Reimplemented from Hydrogen.Peripherals.Input.

Definition at line 95 of file hInput.cs.

96  {
97  // Make sure to do the object pools normal initialization
98  base.Awake ();
99 
100  // Should this gameObject be kept around :) I think so.
101  if (Persistent)
102  DontDestroyOnLoad (gameObject);
103  }
bool Persistent
Should this input manager survive scene switches?
Definition: hInput.cs:42
static bool hInput.Exists ( )
static

Does an Input Manager already exist?

Definition at line 87 of file hInput.cs.

88  {
89  return _staticInstance != null;
90  }

Member Data Documentation

bool hInput.Persistent = true

Should this input manager survive scene switches?

Definition at line 42 of file hInput.cs.

Property Documentation

hInput hInput.Instance
staticget

Gets the input manager instance, creating one if none is found.

The Input Manager.

Definition at line 64 of file hInput.cs.