Class: System

System()

new System()

Game-specific systems should extend this class. They typically define a static `requiredComponents` array specifying which components an entity must have for the system to process it, and an `update` method containing the system's logic.
Properties:
Type Description
Source:

Members

engine

Source:

requiredComponents

An array of component type names (strings) that an entity must possess for this system to be interested in processing it. Derived systems should override this static property. Example: `static requiredComponents = ["Position", "Velocity"];`
Source:

Methods

initialize(engine)

Called when the system is registered with the IroncladEngine. This is a good place for one-time setup or to store the engine reference.
Parameters:
Name Type Description
engine
Source:

shutdown()

Called when the system is unregistered from the IroncladEngine or when the engine is shutting down. Useful for any cleanup tasks the system might need to perform.
Source:

update(deltaTime, entities, engine)

The main update method for the system, called every frame by the IroncladEngine. Derived systems MUST override this method with their specific logic.
Parameters:
Name Type Description
deltaTime number The time elapsed since the last frame, in seconds.
entities
engine
Source:

System()

new System()

Creates an instance of a System. The engine instance can be injected later via the `initialize` method or directly if the system is created by game code that has an engine reference.
Source:

Members

engine

Source:

requiredComponents

An array of component type names (strings) that an entity must possess for this system to be interested in processing it. Derived systems should override this static property. Example: `static requiredComponents = ["Position", "Velocity"];`
Source:

Methods

initialize(engine)

Called when the system is registered with the IroncladEngine. This is a good place for one-time setup or to store the engine reference.
Parameters:
Name Type Description
engine
Source:

shutdown()

Called when the system is unregistered from the IroncladEngine or when the engine is shutting down. Useful for any cleanup tasks the system might need to perform.
Source:

update(deltaTime, entities, engine)

The main update method for the system, called every frame by the IroncladEngine. Derived systems MUST override this method with their specific logic.
Parameters:
Name Type Description
deltaTime number The time elapsed since the last frame, in seconds.
entities
engine
Source: