Home Reference Source
import {GameSystem} from 'shapez.io/js/game/game_system.js'
public class | source

GameSystem

A game system processes all entities which match a given schema, usually a list of required components. This is the core of the game logic.

Static Method Summary

Static Public Methods
public static

Returns static id

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

root: *

Method Summary

Public Methods
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

Static Public Methods

public static getId(): string source

Returns static id

Return:

string

Public Constructors

public constructor(root: GameRoot) source

Params:

NameTypeAttributeDescription
root GameRoot

Public Members

public root: * source

Public Methods

public draw(parameters: DrawParameters) source

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

Params:

NameTypeAttributeDescription
parameters DrawParameters

public refreshCaches() source

Should refresh all caches

public startDraw(parameters: DrawParameters) source

Params:

NameTypeAttributeDescription
parameters DrawParameters

See:

public update() source

Updates the game system, override to perform logic