Constructor of control class. Registers all event handlers.
Mocked navigator object used for testing.
Are we currently on a mobile device? => Touch Controls!
How many pixels the mouse has moved since it's last moved
Shoot button on the html page.
Vessel for location and dimensions of the shoot button on the html page.
States map. Records which key or action is activated at any given moment. Can be polled and updated. Clearing all values, ergo changing all values to false can be done using the clearInputs() method.
Multiplier for mouse look sensitivity
Multiplier for touch look sensitivity
true if we're on mobile
Clears all currently active keys.
how much the mouse has moved on the x axis
Handles key presses.
Key code that was pressed.
Event that gets passed from the listener.
Handles mouse clicks in case the mouse button gets pressed down.
Event that gets passed from the listener.
Handles mouse look.
Event that gets passed from the listener.
Handles mouse clicks in case the mouse button gets released.
Event that gets passed from the listener.
Handles touch input. Gets called as soon as the screen is tapped.
Event that gets passed from the listener.
Handles the end of touch input. Gets called as soon as the screen tap is released.
Event that gets passed from the listener.
Generated using TypeDoc
Control class, handling all user inputs, both touch and via keyboard, as well as handling mouse movement.