Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RouteCacheComponent

This component is attached to all emitters and stores the cached routes. A route contains the way from entity A to entity B, including:

  • Which buildings are involved (transporters which forward the resource)
  • The path in street space
  • The path in world space for the trucks

For every emitter, we store a route to every consumer he delivers

Hierarchy

Index

Constructors

constructor

Methods

deserialize

  • deserialize(data: any): any

getDebugString

  • getDebugString(): string

hasRouteToEntity

  • hasRouteToEntity(entity: any): boolean
  • Returns if this route cache contains a route to the given entity

    Parameters

    • entity: any

    Returns boolean

reset

  • reset(): void
  • Resets all routes

    Returns void

serialize

  • serialize(): object

Static getCachedSchema

  • getCachedSchema(): any

Static getId

  • getId(): string
  • Returns string

Static getSchema

  • getSchema(): object

Static verify

  • verify(data: any): string