Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SyncedNetworkData

Class to work with values, synchronized between server and all clients

Hierarchy

  • SyncedNetworkData

Index

Methods

addOnDataChangeListener

  • addOnDataChangeListener(func: (networkData: SyncedNetworkData, isExternalChange: boolean) => void): void

addVerifier

  • addVerifier(key: any, func: (key: any, newValue: any) => void): void
  • Adds data validator to the object

    Parameters

    • key: any
    • func: (key: any, newValue: any) => void
        • (key: any, newValue: any): void
        • Parameters

          • key: any
          • newValue: any

          Returns void

    Returns void

getBoolean

  • getBoolean(key: any, fallback?: boolean): boolean
  • Parameters

    • key: any
    • Optional fallback: boolean

    Returns boolean

    value by key

getDouble

  • getDouble(key: any, fallback?: number): number
  • Parameters

    • key: any
    • Optional fallback: number

    Returns number

    value by key

getFloat

  • getFloat(key: any, fallback?: number): number
  • Parameters

    • key: any
    • Optional fallback: number

    Returns number

    value by key

getInt

  • getInt(key: any, fallback?: number): number
  • Parameters

    • key: any
    • Optional fallback: number

    Returns number

    value by key

getLong

  • getLong(key: any, fallback?: number): number
  • Parameters

    • key: any
    • Optional fallback: number

    Returns number

    value by key

getString

  • getString(key: any, fallback?: string): string
  • Parameters

    • key: any
    • Optional fallback: string

    Returns string

    value by key

putBoolean

  • putBoolean(key: any, value: boolean): void

putDouble

  • putDouble(key: any, value: number): void

putFloat

  • putFloat(key: any, value: number): void

putInt

  • putInt(key: any, value: number): void

putLong

  • putLong(key: any, value: number): void

putString

  • putString(key: any, value: string): void

sendChanges

  • sendChanges(): void

Generated using TypeDoc