Home Reference Source
import {HubSystem} from 'shapez.io/js/game/systems/hub.js'
public class | source

HubSystem

Extends:

GameSystemGameSystemWithFilter → HubSystem

Static Method Summary

Static Public Methods
public static

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

Method Summary

Public Methods
public

draw(parameters: DrawParameters)

public

drawEntity(parameters: DrawParameters, entity: Entity)

public

redrawHubBaseTexture(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D, w: number, h: number, dpi: number)

public

update()

Inherited Summary

From class GameSystem
public static

Returns static id

public

root: *

public

draw(parameters: DrawParameters)

Override, do not call this directly, use startDraw()

public

Should refresh all caches

public

startDraw(parameters: DrawParameters)

public

update()

Updates the game system, override to perform logic

From class GameSystemWithFilter
public

All entities which match the current components

public
public
public
public
public

Recomputes all target entities after the game has loaded

public
public
public
public

Static Public Methods

public static getId(): string source

Returns static id

Override:

GameSystem#getId

Return:

string

Public Constructors

public constructor() source

Constructs a new game system with the given component filter. It will process all entities which have all of the passed components

Override:

GameSystemWithFilter#constructor

Public Members

public hubSprite: * source

Public Methods

public draw(parameters: DrawParameters) source

Override, do not call this directly, use startDraw()

Override:

GameSystem#draw

Params:

NameTypeAttributeDescription
parameters DrawParameters

public drawEntity(parameters: DrawParameters, entity: Entity) source

Params:

NameTypeAttributeDescription
parameters DrawParameters
entity Entity

public redrawHubBaseTexture(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D, w: number, h: number, dpi: number) source

Params:

NameTypeAttributeDescription
canvas HTMLCanvasElement
context CanvasRenderingContext2D
w number
h number
dpi number

public update() source

Updates the game system, override to perform logic

Override:

GameSystem#update