Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "src/modules/game/engine/seed-dev"

Index

Functions

addActors

  • addActors(world: World, map: Map3D<Entity>, count: number): Entity[]
  • Adds random actors to the world.

    Parameters

    • world: World

      The world instance to add actors to.

    • map: Map3D<Entity>

      The map instance to use for creating Map components.

    • count: number

      The number of actors to add.

    Returns Entity[]

    • An array of the actor entities that were added.

createGridPool

  • createGridPool(xSize: number, ySize: number, zSize: number): IGrid[]
  • Creates a list of grid coordinates for an area of a specified size.

    Parameters

    • xSize: number

      The width of the grid pool to create.

    • ySize: number

      The length of the grid pool to create.

    • zSize: number

      The height of the grid pool to create.

    Returns IGrid[]

    • An array of grid coordinates.

getRandomDirection

hopTest

  • hopTest(world: World, map: Map3D<Entity>): void
  • Debug function used to create actors in specific locations and hop them in specific directions at specific times.

    Parameters

    • world: World

      The game world instance.

    • map: Map3D<Entity>

      The map instance to create actors in.

    Returns void

randomColor

  • randomColor(): number

randomString

  • randomString(__namedParameters: [number, number], length: number): string
  • Generates a random string of specified length and character code space.

    Parameters

    • __namedParameters: [number, number]

      The range of character codes to use in the generated string.

    • length: number

      The length of the string to generate.

    Returns string

    • A random string.

seedGame

  • seedGame(world: World, map: Map3D<Entity>): void
  • Populates the game with actors for demonstration purposes.

    Parameters

    • world: World

      The game world instance.

    • map: Map3D<Entity>

      The map instance to create actors in.

    Returns void

Generated using TypeDoc