SkeldJS
    Preparing search index...

    Class ShipStatus<RoomType>Abstract

    Represents a basic networked object in Among Us.

    See NetworkedObjectEvents for events to listen to.

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    roomDoors: Partial<Record<SystemType, number[]>>
    components: NetworkedObject<RoomType, any>[]
    flags: number
    initialSpawnCenter: Vector2 = Vector2.null
    meetingSpawnCenter: Vector2 = Vector2.null
    netId: number
    ownerId: number
    pendingDataState: DataState
    player: undefined | Player<RoomType>

    The player that this component belongs to.

    room: RoomType
    spawnRadius: number = 1.55
    spawnType: SpawnType
    systems: AllSystems<RoomType> = ...

    Accessors

    Methods

    • Get the spawn position of a player whether they are about to spawn after starting or whether they are about to spawn after a meeting.

      Parameters

      • player: number | Player<RoomType>

        The player or player ID to determine the position of.

      • initialSpawn: boolean

        Whther or not this is a spawn after starting the game.

      Returns Vector2

      The spawn position of the player.

    • Teleport a player to their spawn position, calculated using ShipStatus.getSpawnPosition.

      Parameters

      • player: Player<RoomType>

        The player to determine the position of.

      • initialSpawn: boolean

        Whether or not this is a spawn after starting the game.

      • broadcast: boolean

        Whether or not to broadcast the updates.

      Returns Promise<void>