Class FuncDoor
Namespace: ValveResourceFormat.Renderer.Entities
Assembly: Renderer.dll
func_door and func_movelinear. A brush that slides open along its movedir and back again, Source's CBaseDoor. Not simulated: the blocking behaviour that reverses a door onto whoever stands in it, and the door groups that open together.
public class FuncDoor : BaseToggleInheritance
object ← BaseEntity ← BaseModelEntity ← BaseToggle ← FuncDoor
Derived
Inherited Members
BaseToggle.Speed, BaseToggle.Lip, BaseToggle.MoveDirection, BaseToggle.FinalDestination, BaseToggle.IsLinearMoving, BaseToggle.IsPusher, BaseToggle.LinearMove(Vector3), BaseToggle.AngularMove(Vector3, float), BaseToggle.FinishLinearMove(), BaseToggle.GetAxisDirection(bool, bool), BaseToggle.ResolveMoveDirection(bool), BaseToggle.GetTravelDistance(), BaseModelEntity.ModelNode, BaseModelEntity.CreateRootNode(), BaseEntity.Scene, BaseEntity.RootNode, BaseEntity.Transform, BaseEntity.LayerName, BaseEntity.EntitySystem, BaseEntity.Data, BaseEntity.KeyValues, BaseEntity.Classname, BaseEntity.TargetName, BaseEntity.SpawnFlags, BaseEntity.ParentTransform, BaseEntity.Owner, BaseEntity.MoveParent, BaseEntity.EntityScale, BaseEntity.ModelName, BaseEntity.Origin, BaseEntity.Angles, BaseEntity.Velocity, BaseEntity.AngularVelocity, BaseEntity.NextThink, BaseEntity.MoveDoneTime, BaseEntity.IsRemoved, BaseEntity.Collider, BaseEntity.IsSolid, BaseEntity.IsTrigger, BaseEntity.IsDrawn, BaseEntity.InPlayableWorld, BaseEntity.IsCollidable, BaseEntity.TouchingEntities, BaseEntity.CreateRootNode(), BaseEntity.HasSpawnFlags<TSpawnFlags>(TSpawnFlags), BaseEntity.Spawn(), BaseEntity.Activate(), BaseEntity.Think(), BaseEntity.RoundStart(), BaseEntity.MoveDone(), BaseEntity.TryGetTouchBounds(out Vector3, out Vector3), BaseEntity.AcceptsTouchFrom(BaseEntity), BaseEntity.OnStartTouch(BaseEntity), BaseEntity.OnTouch(BaseEntity), BaseEntity.OnEndTouch(BaseEntity), BaseEntity.ObjectCaps, BaseEntity.Use(BaseEntity?), BaseEntity.Teleport(Vector3, Vector3?), BaseEntity.AcceptInput(string, EntityInputData), BaseEntity.InputKill(EntityInputData), BaseEntity.InputFireUser1(EntityInputData), BaseEntity.InputFireUser2(EntityInputData), BaseEntity.InputFireUser3(EntityInputData), BaseEntity.InputFireUser4(EntityInputData), BaseEntity.SetNextThink(float), BaseEntity.SetMoveDoneTime(float), BaseEntity.PhysicsSimulate(float), BaseEntity.IsPusher, BaseEntity.PusherForcesThrough, BaseEntity.GetSurfaceVelocity(Vector3), BaseEntity.TurnBody(Vector3, Vector3), BaseEntity.SetOriginAndAngles(Vector3, Vector3), BaseEntity.AddNode(SceneNode), BaseEntity.OnRemove(), BaseEntity.UpdateTransform(), BaseEntity.UpdateColliderTransform(), BaseEntity.UpdateRenderTransform(float), BaseEntity.SnapInterpolation(), BaseEntity.OnSpawnGroupTransformApplied(), BaseEntity.AngleMod(float)
Constructors
FuncDoor(EntitySystem, EntitySpawnInfo)
Initializes a func_door from its keyvalues.
public FuncDoor(EntitySystem system, EntitySpawnInfo spawnInfo)Parameters
system EntitySystem
spawnInfo EntitySpawnInfo
Properties
ForceClosed
Gets whether the door closes whatever stands in it, the forceclosed keyvalue.
public bool ForceClosed { get; }Property Value
IsLocked
Gets whether the door refuses to open.
public bool IsLocked { get; protected set; }Property Value
IsOpen
Gets where the door is in its travel.
public bool IsOpen { get; }Property Value
LastActivator
Gets the entity that last set the door moving, for whatever the travel needs it for.
protected BaseEntity? LastActivator { get; }Property Value
ObjectCaps
Gets whether the player can open this door by pressing it. Source's CBaseDoor::ObjectCaps: a door is only usable when the map said so.
public override EntityCapability ObjectCaps { get; }Property Value
PositionClosed
Gets the place the door rests when closed.
protected Vector3 PositionClosed { get; set; }Property Value
PositionOpen
Gets the place the door rests when open.
protected Vector3 PositionOpen { get; set; }Property Value
PusherForcesThrough
Gets whether a blocked push crushes on rather than holding, the forceclosed behaviour.
protected override bool PusherForcesThrough { get; }Property Value
State
Gets where the door is in its travel.
protected BaseToggle.ToggleState State { get; }Property Value
Wait
Gets the seconds the door stays open before closing; -1 means it stays open.
public float Wait { get; protected set; }Property Value
Methods
Close()
Closes the door, unless it is already going that way.
public void Close()InputClose(EntityInputData)
Closes the door.
[EntityInput("Close")]
protected void InputClose(EntityInputData data)Parameters
data EntityInputData
InputLock(EntityInputData)
Stops the door opening until it is unlocked.
[EntityInput("Lock")]
protected void InputLock(EntityInputData data)Parameters
data EntityInputData
InputOpen(EntityInputData)
Opens the door.
[EntityInput("Open")]
protected void InputOpen(EntityInputData data)Parameters
data EntityInputData
InputSetSpeed(EntityInputData)
Changes how fast the door travels.
[EntityInput("SetSpeed")]
protected void InputSetSpeed(EntityInputData data)Parameters
data EntityInputData
InputToggle(EntityInputData)
Opens a closed door, closes an open one.
[EntityInput("Toggle")]
protected void InputToggle(EntityInputData data)Parameters
data EntityInputData
InputUnlock(EntityInputData)
Lets the door open again.
[EntityInput("Unlock")]
protected void InputUnlock(EntityInputData data)Parameters
data EntityInputData
MoveDone()
Runs when comes due, after the tick's movement was applied.
public override void MoveDone()OnArrived(bool)
Runs when the door lands at either end, for a class with sounds to play.
protected virtual void OnArrived(bool open)Parameters
open bool
OnLockedUse()
Runs on a press that the lock refused, for a class with sounds to play.
protected virtual void OnLockedUse()OnSetOff(bool)
Runs as the door sets off, for a class with sounds to play.
protected virtual void OnSetOff(bool opening)Parameters
opening bool
Open(BaseEntity?)
Opens the door, unless it is locked or already going that way.
public void Open(BaseEntity? activator = null)Parameters
activator BaseEntity?
ReadWait()
Reads how long the door stays open, whichever keyvalue the class authors it as.
protected virtual float ReadWait()Returns
SetUpTravel()
Works out where the door's two ends are. A door that turns rather than slides overrides this.
protected virtual void SetUpTravel()Spawn()
Sets up the entity: loads its model, reads class-specific keyvalues, and schedules its first think. Called by right after construction, before the entity enters the world.
public override void Spawn()SpawnsOpen()
Reads whether the map authored the door at its open position.
protected virtual bool SpawnsOpen()Returns
StartMove(bool)
Sets the door travelling towards one of its two ends.
protected virtual void StartMove(bool opening)Parameters
opening bool
SwapEnds()
Exchanges the two ends, for a door the map authored in its open position.
protected virtual void SwapEnds()Think()
Closes the door once it has stood open for its wait.
public override void Think()Toggle(BaseEntity?)
Opens a closed door and closes an open one, which is what a use or a toggle means.
public void Toggle(BaseEntity? activator = null)Parameters
activator BaseEntity?
Use(BaseEntity?)
Runs when something presses this entity. Source's CBaseEntity::Use, minus the use type and value, which nothing here distinguishes.
public override void Use(BaseEntity? activator)Parameters
activator BaseEntity?

