Class ShipInputProvider
Base class for all ship input providers. Inherit from this to create custom input systems for ship controls. Provides virtual methods for all ship control inputs including throttle, steering, thrusters, and submarine depth control.
Inheritance
Inherited Members
Namespace: NWH.DWP2.ShipController
Assembly: NWH.DWP2.dll
Syntax
public abstract class ShipInputProvider : InputProvider
Methods
| Edit this page View SourceAnchor()
Toggle anchor drop/weigh state.
Declaration
public virtual bool Anchor()
Returns
| Type | Description |
|---|---|
| bool | True if anchor toggle was triggered this frame. |
BowThruster()
Bow thruster input from -1 to 1 for lateral movement at the front.
Declaration
public virtual float BowThruster()
Returns
| Type | Description |
|---|---|
| float | Bow thruster input value. |
DragObjectModifier()
Modifier key for object dragging.
Declaration
public virtual bool DragObjectModifier()
Returns
| Type | Description |
|---|---|
| bool | True if drag modifier is held. |
DragObjectPosition()
Mouse or touch position for object dragging in demo scenes.
Declaration
public virtual Vector2 DragObjectPosition()
Returns
| Type | Description |
|---|---|
| Vector2 | Drag position delta. |
EngineStartStop()
Toggle engine start/stop state.
Declaration
public virtual bool EngineStartStop()
Returns
| Type | Description |
|---|---|
| bool | True if engine start/stop was triggered this frame. |
RotateSail()
Sail rotation input for sailing vessels.
Declaration
public virtual float RotateSail()
Returns
| Type | Description |
|---|---|
| float | Sail rotation input value. |
Steering()
Horizontal steering input from -1 (port/left) to 1 (starboard/right).
Declaration
public virtual float Steering()
Returns
| Type | Description |
|---|---|
| float | Steering input value. |
SternThruster()
Stern thruster input from -1 to 1 for lateral movement at the rear.
Declaration
public virtual float SternThruster()
Returns
| Type | Description |
|---|---|
| float | Stern thruster input value. |
SubmarineDepth()
Submarine depth control from -1 (surface) to 1 (dive).
Declaration
public virtual float SubmarineDepth()
Returns
| Type | Description |
|---|---|
| float | Submarine depth input value. |
Throttle()
Primary throttle input from -1 (full reverse) to 1 (full forward).
Declaration
public virtual float Throttle()
Returns
| Type | Description |
|---|---|
| float | Throttle input value. |
Throttle2()
Secondary throttle input for independent engine control.
Declaration
public virtual float Throttle2()
Returns
| Type | Description |
|---|---|
| float | Throttle2 input value. |
Throttle3()
Tertiary throttle input for independent engine control.
Declaration
public virtual float Throttle3()
Returns
| Type | Description |
|---|---|
| float | Throttle3 input value. |
Throttle4()
Quaternary throttle input for independent engine control.
Declaration
public virtual float Throttle4()
Returns
| Type | Description |
|---|---|
| float | Throttle4 input value. |