Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

  • new Player(playerState?: Partial<PlayerState>, fields: ModelField[]): Player

Properties

_events: EventLite = ...
fields: ModelField[]
state: PlayerState

Accessors

  • get avatar(): string
  • set avatar(value: string): void
  • get id(): number
  • get isStub(): boolean
  • get name(): string
  • set name(value: string): void
  • get score(): number
  • set score(value: number): void

Methods

  • add(key: string, value: string | number | boolean): void
  • fromJSON(state: Partial<PlayerState>): void
  • get(key: string): string | number | boolean
  • getField(key: string): ModelField
  • getFieldName(key: string): string
  • getFieldVariantName(key: string, value: string | number): string
  • has(key: string): boolean
  • off<ET>(type: ET, handler: ((event: MyPlayerEvents[ET]) => void)): void
  • on<ET>(type: ET, handler: ((event: MyPlayerEvents[ET]) => void)): void
  • once<ET>(type: ET, handler: ((event: MyPlayerEvents[ET]) => void)): void
  • remove(): void
  • reset(): void
  • set(key: string, value: string | number | boolean): void
  • toJSON(): PlayerState
  • toggle(key: string): void

Generated using TypeDoc