Options
All
  • Public
  • Public/Protected
  • All
Menu

Server side part of the player.

Hierarchy

  • AbstractExperience
    • ServerPlayerExperience

Index

Constructors

constructor

  • Parameters

    • server: any

      The soundworks core server instance.

    • clientTypes: string

      Name of the client (e.g. 'player', 'controller').

    • aggregatorCollection: AggregatorCollection

      The global AggregatorCollection singleton.

    • eventEmitter: EventEmitter

      The global EventEmitter singleton.

    • options: {} = {}

      Options.

      Returns ServerPlayerExperience

    Properties

    Readonly aggregatorCollection

    aggregatorCollection: AggregatorCollection

    Singleton that stores all aggregators for every module that has an AggregatorValue. Here: Used to update the AggregatorModels with player input.

    eventEmitter

    eventEmitter: EventEmitter

    Singleton to send and receive data across objects on server side. Here:

    • Register added & deleted AggregatorSubscriptions
    • Register added & deleted OutputModels
    • Control what happens when Events arrive from other objects

    server

    server: any

    The soundworks core server as singleton instance.

    stateGuard

    stateGuard: ServerStateGuard

    Used to ensure strongly typed StateManagers defined in Schemas.ts. Communcation with the clients is handled here.

    Methods

    enter

    • enter(client: any): void
    • Defines what to do when a controller client enters.

      Parameters

      • client: any

        Soundworks definition of client.

      Returns void

    exit

    • exit(client: any): void
    • Defines what to do when a controller client leaves.

      Parameters

      • client: any

        Soundworks definition of client.

      Returns void

    handleInputs

    • Defines what to do when a player client communicates with this player server instance.

      Parameters

      • inputs: PlayerInputType

        The inputs/changes that have been made.

      • nodeId: any

        The Id of the controller client that send the inputs/changes.

      Returns void

    setupEventManagement

    • setupEventManagement(): void
    • Defines inter-object connection and behaviour through the EventEmitter.

      Returns void

    setupStateManagement

    • setupStateManagement(): Promise<void>
    • Defines typesafe behaviour of the soundworks stateManager.

      Returns Promise<void>

    start

    • start(): Promise<void>
    • Start the experience.

      Returns Promise<void>

    Generated using TypeDoc