Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PlayerInfo<RoomType>

Represents information about a player, including any cosmetics they have equipped, whether they are dead or the impostor, their role and whatever tasks they have.

Type parameters

  • RoomType: Hostable

Hierarchy

  • PlayerInfo

Index

Methods

Static Deserialize

Static createDefault

  • createDefault<RoomType>(gamedata: GameData<RoomType>, playerId: number): PlayerInfo<RoomType>
  • Create a default player info object.

    Type parameters

    • RoomType: Hostable<any, RoomType>

    Parameters

    • gamedata: GameData<RoomType>

      The gamedata object that this player information belongs to.

    • playerId: number

      The ID of the player.

    Returns PlayerInfo<RoomType>

    A default player info object.

Deserialize

Serialize

clone

completeTask

deleteOutfit

getOutfit

getPlayer

  • getPlayer(): undefined | PlayerData<RoomType>

setColor

setDead

  • setDead(isDead: boolean): void

setDisconnected

  • setDisconnected(isDisconnected: boolean): void

setFlags

  • setFlags(flags: number): void

setHat

setImpostor

  • setImpostor(isImpostor: boolean): void

setName

setNameplate

setOutfit

setPet

setSkin

setTaskIds

  • setTaskIds(taskIds: number[]): Promise<void>

setTaskStates

  • setTaskStates(taskStates: TaskState[]): void

setVisor

Constructors

constructor

Accessors

currentOutfit

defaultOutfit

isDead

  • get isDead(): boolean

isDisconnected

  • get isDisconnected(): boolean

isImpostor

  • get isImpostor(): boolean

Properties

currentOutfitType

currentOutfitType: PlayerOutfitType

flags

flags: number = 0

friendCode

friendCode: string

Readonly gamedata

gamedata: GameData<RoomType>

outfits

outfits: Partial<Record<PlayerOutfitType, PlayerOutfit>>

Readonly playerId

playerId: number

playerLevel

playerLevel: number

puid

puid: string

roleType

roleType: typeof BaseRole

taskStates

taskStates: TaskState[] = []

Generated using TypeDoc