Table of Contents

Class DoorController

Namespace
S1API.Doors
Assembly
S1API.dll

Wrapper for ScheduleOne DoorController component. Provides a clean API without exposing game types directly.

public sealed class DoorController
Inheritance
DoorController
Inherited Members
Extension Methods

Constructors

DoorController(GameObject)

Creates a new wrapper from a GameObject containing the DoorController component.

public DoorController(GameObject gameObject)

Parameters

gameObject GameObject

GameObject containing the DoorController component.

Properties

AutoOpenForPlayer

Gets or sets whether players can automatically open the door.

public bool AutoOpenForPlayer { get; set; }

Property Value

bool

IsOpen

Gets whether the door is currently open.

public bool IsOpen { get; }

Property Value

bool

OpenableByNPCs

Gets or sets whether NPCs can open the door.

public bool OpenableByNPCs { get; set; }

Property Value

bool

PlayerAccess

Gets or sets door access level.

public DoorAccess PlayerAccess { get; set; }

Property Value

DoorAccess

Methods

SetIsOpen(bool, DoorSide)

Sets whether the door is open.

public void SetIsOpen(bool open, DoorSide side)

Parameters

open bool

True to open, false to close.

side DoorSide

The side the door is being opened from.

Events

OnDoorClosed

Event fired when the door is closed.

public event Action OnDoorClosed

Event Type

Action

OnDoorOpened

Event fired when the door is opened from a specific side.

public event Action<DoorSide> OnDoorOpened

Event Type

Action<DoorSide>

OnDoorOpenedAny

Event fired when the door is opened (any side).

public event Action OnDoorOpenedAny

Event Type

Action