Options
All
  • Public
  • Public/Protected
  • All
Menu

A namespace of functional equivalents to the gdjs.Variable methods, needed for events code generation.

namespace

Index

Functions

  • getFirstVariableNumber(array: Variable): number
  • Shortcut to get the first value of an array variable as a number.

    Parameters

    Returns number

  • getFirstVariableString(array: Variable): string
  • Shortcut to get the last value of an array variable as a string.

    Parameters

    Returns string

  • getLastVariableNumber(array: Variable): number
  • Shortcut to get the last value of an array variable as a number.

    Parameters

    Returns number

  • getLastVariableString(array: Variable): string
  • Shortcut to get the last value of an array variable as a string.

    Parameters

    Returns string

  • getVariableBoolean(variable: Variable, compareWith: boolean): boolean
  • Compares the boolean value of a variable. Equivalent to variable.getAsBoolean() === boolean. This shortcut function is needed for events code generation.

    Parameters

    Returns boolean

  • getVariableChildCount(variable: Variable): number
  • Get the number of children in a variable. This shortcut function is needed for events code generation.

    Parameters

    Returns number

  • getVariableNumber(variable: Variable): number
  • Get the value of a variable. Equivalent to variable.getAsNumber(). This shortcut function is needed for events code generation.

    Parameters

    Returns number

  • getVariableString(variable: Variable): string
  • Get the string of a variable. Equivalent to variable.getAsString(). This shortcut function is needed for events code generation.

    Parameters

    Returns string

  • Check if a global variable exists. This shortcut function is needed for events code generation.

    Parameters

    Returns boolean

  • sceneVariableExists(runtimeScene: RuntimeScene, variableName: string): boolean
  • Check if a scene variable exists. This shortcut function is needed for events code generation.

    Parameters

    Returns boolean

  • setVariableBoolean(variable: Variable, newValue: boolean): void
  • Set the boolean value of a variable. Equivalent to variable.setBoolean(). This shortcut function is needed for events code generation.

    Parameters

    Returns void

  • toggleVariableBoolean(variable: Variable): void
  • Toggles the boolean value of a variable. This shortcut function is needed for events code generation.

    Parameters

    Returns void

  • valuePush(array: Variable, value: string | number | boolean): void
  • Pushes a value onto an array. This shortcut function is needed for events code generation.

    Parameters

    • array: Variable
    • value: string | number | boolean

    Returns void

  • variableChildExists(variable: Variable, childName: string): boolean
  • Check if a child exists in a variable. This shortcut function is needed for events code generation.

    Parameters

    Returns boolean

  • variableClearChildren(variable: Variable): void
  • Clear the children in a variable. This shortcut function is needed for events code generation.

    Parameters

    Returns void

  • Pushes a variable onto an array. This shortcut function is needed for events code generation.

    Parameters

    Returns void

  • variableRemoveAt(array: Variable, index: number): void
  • Removes an index from an array. This shortcut function is needed for events code generation.

    Parameters

    Returns void

  • variableRemoveChild(variable: Variable, childName: string): void
  • Remove the child with the given name in a variable. This shortcut function is needed for events code generation.

    Parameters

    Returns void

Generated using TypeDoc