Interface IMyCockpit
Describes cockpit block (mods interface)
Inherited Members
Namespace: Sandbox.ModAPI
Assembly: Sandbox.Common.dll
Syntax
public interface IMyCockpit : IMyShipController, IMyTerminalBlock, IMyCubeBlock, IMyEntity, IMyControllableEntity, IMyTargetingCapableBlock, IMyCockpit, IMyShipController, IMyTerminalBlock, IMyCubeBlock, IMyEntity, IMyCameraController, IMyTextSurfaceProvider, IMyTextSurfaceProvider
Properties
IsOccupied
Gets whether the cockpit is occupied by some pilot or not
Declaration
bool IsOccupied { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
OxygenFilledRatio
Gets or sets the current oxygen level of this cockpit, as a value between 0 (empty) and 1 (full).
Declaration
float OxygenFilledRatio { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Methods
AttachPilot(IMyCharacter)
Place a pilot in the cockpit seat.
Declaration
void AttachPilot(IMyCharacter pilot)
Parameters
Type | Name | Description |
---|---|---|
IMyCharacter | pilot | Character to place in seat |
AttachPilot(IMyCharacter, Int32)
Place a pilot in the cockpit seat.
Declaration
void AttachPilot(IMyCharacter pilot, int animation)
Parameters
Type | Name | Description |
---|---|---|
IMyCharacter | pilot | Character to place in seat |
System.Int32 | animation | Number of animation in CharacterAnimations |
RemovePilot()
Removes an attached pilot. Call on server.
Declaration
void RemovePilot()
Events
IsOccupiedChanged
Raised when is occupied is changed (cockpit instance)
Declaration
event Action<IMyCockpit> IsOccupiedChanged
Event Type
Type | Description |
---|---|
System.Action<IMyCockpit> |