BaseChairclass
Constructors1
Showing 1 constructors
public BaseChair()
No results match this filter.
Methods15
Showing 15 methods
public virtual sealed void AskToLeave(Sandbox.PlayerController player)
Called on the host to request leaving the chair.
| Parameter | Type | Description |
|---|---|---|
| player | PlayerController | — |
void—public virtual Transform CalculateEyeTransform(Sandbox.PlayerController controller)
Calculates the eye transform for a seated player
| Parameter | Type | Description |
|---|---|---|
| controller | PlayerController | — |
public virtual bool CanEnter(Sandbox.PlayerController player)
Return true if this player can enter the chair
| Parameter | Type | Description |
|---|---|---|
| player | PlayerController | — |
bool—public virtual bool CanLeave(Sandbox.PlayerController player)
Return true if this player can leave the chair
| Parameter | Type | Description |
|---|---|---|
| player | PlayerController | — |
bool—public virtual sealed bool CanPress(Sandbox.Component.IPressable.Event e)
Chair is usable if the player can enter
| Parameter | Type | Description |
|---|---|---|
| e | Event | — |
bool—protected void ClampEyes(Sandbox.PlayerController controller)
Clamps the eye angles of a seated player between the PitchRange and YawRange
| Parameter | Type | Description |
|---|---|---|
| controller | PlayerController | — |
void—protected virtual void DrawGizmos()
Draws the player model sitting in the chair if it's selected
void—public void Eject(Sandbox.PlayerController player)
Called on the client to eject the player from the chair.
| Parameter | Type | Description |
|---|---|---|
| player | PlayerController | — |
void—public Vector3 FindBestExitPoint()
Returns a position to place the player when they exit the chair. This searches through ExitPoints to find the best one, which is usually the one the player is most facing towards.
public virtual Transform GetEyeTransform()
Get the transform representing the eye position when seated
public Sandbox.PlayerController GetOccupant()
Gets the player that is currently occupying the chair
public virtual System.Nullable`1<Sandbox.Component.IPressable.Tooltip> GetTooltip(Sandbox.Component.IPressable.Event e)
| Parameter | Type | Description |
|---|---|---|
| e | Event | — |
public virtual sealed bool Press(Sandbox.Component.IPressable.Event e)
Called when the player has pressed to use the chair. Only called if CanPress returned true.
| Parameter | Type | Description |
|---|---|---|
| e | Event | — |
bool—public void Sit(Sandbox.PlayerController player)
Called on the client to place the player in the chair.
| Parameter | Type | Description |
|---|---|---|
| player | PlayerController | — |
void—public virtual void UpdatePlayerAnimator(Sandbox.PlayerController controller, Sandbox.SkinnedModelRenderer renderer)
Called to update the player's animator when seated
| Parameter | Type | Description |
|---|---|---|
| controller | PlayerController | — |
| renderer | SkinnedModelRenderer | — |
void—No results match this filter.
Properties11
Showing 11 properties
public Sandbox.GameObject[] Sandbox.BaseChair.ExitPoints { get; set; }
public Sandbox.GameObject Sandbox.BaseChair.EyePosition { get; set; }
A GameObject representing the eye position
public bool Sandbox.BaseChair.IsOccupied { get; set; }
Returns true if the chair is currently occupied
bool—public Sandbox.GameObject Sandbox.BaseChair.SeatPosition { get; set; }
A GameObject representing the seat position
public float Sandbox.BaseChair.SitHeight { get; set; }
Height offset for sitting position, from -1 (lowest) to 1 (highest)
float—public Sandbox.BaseChair.AnimatorSitPose Sandbox.BaseChair.SitPose { get; set; }
The sitting pose to use when a player is seated
public string Sandbox.BaseChair.TooltipDescription { get; set; }
A longer description for this chair's tooltip.
string—public string Sandbox.BaseChair.TooltipIcon { get; set; }
The icon for this chair's tooltip. Either Material Icons or an Emoji.
string—public string Sandbox.BaseChair.TooltipTitle { get; set; }
The title of this chair's tooltip. Empty to disable.
string—No results match this filter.