mooball
    Preparing search index...

    Class GameState

    A class that defines the complete game state of a room.

    Index

    Constructors

    Properties

    blueScore: number

    The current score of blue team.

    clockPaused: boolean

    Whether the clock is paused or not.

    endTicksMax: number

    Number of ticks the physics engine waits after deciding that the game is over before ending the game.

    ext: GameState | null

    The extrapolated version of this GameState, or null if the data is not available.

    goalConcedingTeam: Team

    The team that conceded the last goal.

    goalTickCounter: number

    Counts how many ticks are left to reset the positions of discs. This value is set to 150 just after a goal is scored.

    goalTicksMax: number

    Number of ticks the physics engine waits after each goal before restarting the game.

    overtimeLimit: number

    The over-time limit of the game. -1 = no limit.

    paused: boolean

    Whether the game is currently paused or not.

    pauseGameTickCounter: number

    Counts how many ticks are left to resume the game. This value is set to 120 whenever the game is paused.

    pauseTicksMax: number

    Number of ticks the physics engine waits after each pause before resuming the game.

    physicsState: World

    The physical state of the objects inside the game.

    redScore: number

    The current score of red team.

    scoreLimit: number

    The score limit of the game. 0 = no limit.

    stadium: IStadium

    The stadium that the game is currently being played in.

    The current state of the actual gameplay.

    timeElapsed: number

    The currently elapsed time in miliseconds.

    timeLimit: number

    The time limit of the game in seconds. -1 = no limit.

    Methods

    • Advances the game time steps number of frames. Called automatically by the game itself.

      Parameters

      • steps: number

        The number of game ticks to execute.

      Returns void