
Detailed Description
Controls a Thruster (or more) using key events (keyboard, controllers). It uses the legacy Input system (Input.GetKey and Input.GetKeyDown events). All thrusters have public methods so you can make your custom controls, or even animation triggered events.
Member Data Documentation
◆ thrusters
BThrusterBase [] BArtisan.Thrusters.Helpers.Controllers.BThrusterKeyController.thrusters |
Manual add the thrusters you want to control. Leave empty for auto search in this GO and its children.
◆ keyModifier
KeyCode BArtisan.Thrusters.Helpers.Controllers.BThrusterKeyController.keyModifier |
Key modifier that affects all the controls. Ex: CTRL or ALT.
◆ ignitionOn
KeyCode BArtisan.Thrusters.Helpers.Controllers.BThrusterKeyController.ignitionOn |
Power on the thruster in the frame when this key is pressed.
◆ ignitionOff
KeyCode BArtisan.Thrusters.Helpers.Controllers.BThrusterKeyController.ignitionOff |
Power off the thruster in the frame when this key is pressed.
◆ toggleIgnitionOnOff
KeyCode BArtisan.Thrusters.Helpers.Controllers.BThrusterKeyController.toggleIgnitionOnOff |
Toggle the engine on/off in the frame when this key is pressed.
◆ accelerateWhilePressing
KeyCode BArtisan.Thrusters.Helpers.Controllers.BThrusterKeyController.accelerateWhilePressing |
As long as this key is pressed, throttle is increased with the default accelerationThrottlePerFrame each frame.
◆ decelerateWhilePressing
KeyCode BArtisan.Thrusters.Helpers.Controllers.BThrusterKeyController.decelerateWhilePressing |
As long as this key is pressed, throttle is decreased with the default accelerationThrottlePerFrame each frame.
◆ accelerateOnceWhenPressed
KeyCode BArtisan.Thrusters.Helpers.Controllers.BThrusterKeyController.accelerateOnceWhenPressed |
Increase the throttle with accelerationThrottlePerFrame just once, when this key is pressed.
◆ decelerateOnceWhenPressed
KeyCode BArtisan.Thrusters.Helpers.Controllers.BThrusterKeyController.decelerateOnceWhenPressed |
Decrease the throttle with accelerationThrottlePerFrame just once, when this key is pressed.
◆ throttleToMin
KeyCode BArtisan.Thrusters.Helpers.Controllers.BThrusterKeyController.throttleToMin |
Keyboard shortcut to reduce the thruster power to it's minimum throttle value.
◆ throttleToMax
KeyCode BArtisan.Thrusters.Helpers.Controllers.BThrusterKeyController.throttleToMax |
Keyboard shortcut to increase the thruster power to it's maximum throttle value.
◆ autoDecelerate
bool BArtisan.Thrusters.Helpers.Controllers.BThrusterKeyController.autoDecelerate = true |
◆ autoStart
bool BArtisan.Thrusters.Helpers.Controllers.BThrusterKeyController.autoStart = true |
When this GO is activated, it will turn ON the engine.
◆ debugLog
|
inherited |
Enable to debug this component. Warning: it may result in CPU intensive debug messages (each frame).
Member Function Documentation
◆ Accelerate()
void BArtisan.Thrusters.Helpers.Controllers.BThrusterKeyController.Accelerate | ( | ) |