Components
Component-based UI layout helpers and component utilities for players.Members
- mergeComponents
- mergeComponents
- removeComponents
- removeComponents
- setComponentsBottom
- setComponentsBottom
- setComponentsCenter
- setComponentsCenter
- setComponentsLeft
- setComponentsLeft
- setComponentsRight
- setComponentsRight
- setComponentsTop
- setComponentsTop
- setGraphic
- WithComponentManager
mergeComponents
Merge components with existing components at a specific position Merges new components with existing components at the specified position.- Source:
packages/server/src/Player/ComponentManager.ts - Kind:
method
Signature
Parameters
position:ComponentPositionlayout:ComponentInputoptions?:ComponentLayout
Returns
voidExamples
mergeComponents
Merge components with existing components at a specific position- Source:
packages/server/src/Player/ComponentManager.ts - Kind:
method - Defined in:
IComponentManager
Signature
Parameters
position:ComponentPositionlayout:ComponentInputoptions?:ComponentLayout
Returns
voidremoveComponents
Remove components from a specific position Deletes all components at the specified position.- Source:
packages/server/src/Player/ComponentManager.ts - Kind:
method
Signature
Parameters
position:ComponentPosition
Returns
voidExamples
removeComponents
Remove components from a specific position- Source:
packages/server/src/Player/ComponentManager.ts - Kind:
method - Defined in:
IComponentManager
Signature
Parameters
position:ComponentPosition
Returns
voidsetComponentsBottom
Set components to display below the player graphic Components are displayed below the player’s sprite and can include text, bars, shapes, or any combination. The components are synchronized to all clients on the map.- Source:
packages/server/src/Player/ComponentManager.ts - Kind:
method
Signature
Parameters
layout:ComponentInputoptions?:ComponentLayout
Returns
voidExamples
setComponentsBottom
Set components to display below the player graphic- Source:
packages/server/src/Player/ComponentManager.ts - Kind:
method - Defined in:
IComponentManager
Signature
Parameters
layout:ComponentInputoptions?:ComponentLayout
Returns
voidsetComponentsCenter
Set components to display at the center of the player graphic Components are displayed at the center of the player’s sprite. Be careful: if you assign, it deletes the graphics and if the lines are superimposed.- Source:
packages/server/src/Player/ComponentManager.ts - Kind:
method
Signature
Parameters
layout:ComponentInputoptions?:ComponentLayout
Returns
voidExamples
setComponentsCenter
Set components to display at the center of the player graphic- Source:
packages/server/src/Player/ComponentManager.ts - Kind:
method - Defined in:
IComponentManager
Signature
Parameters
layout:ComponentInputoptions?:ComponentLayout
Returns
voidsetComponentsLeft
Set components to display to the left of the player graphic Components are displayed to the left of the player’s sprite.- Source:
packages/server/src/Player/ComponentManager.ts - Kind:
method
Signature
Parameters
layout:ComponentInputoptions?:ComponentLayout
Returns
voidExamples
setComponentsLeft
Set components to display to the left of the player graphic- Source:
packages/server/src/Player/ComponentManager.ts - Kind:
method - Defined in:
IComponentManager
Signature
Parameters
layout:ComponentInputoptions?:ComponentLayout
Returns
voidsetComponentsRight
Set components to display to the right of the player graphic Components are displayed to the right of the player’s sprite.- Source:
packages/server/src/Player/ComponentManager.ts - Kind:
method
Signature
Parameters
layout:ComponentInputoptions?:ComponentLayout
Returns
voidExamples
setComponentsRight
Set components to display to the right of the player graphic- Source:
packages/server/src/Player/ComponentManager.ts - Kind:
method - Defined in:
IComponentManager
Signature
Parameters
layout:ComponentInputoptions?:ComponentLayout
Returns
voidsetComponentsTop
Set components to display above the player graphic Components are displayed above the player’s sprite and can include text, bars, shapes, or any combination. The components are synchronized to all clients on the map.- Source:
packages/server/src/Player/ComponentManager.ts - Kind:
method
Signature
Parameters
layout:ComponentInputoptions?:ComponentLayout
Returns
voidExamples
setComponentsTop
Set components to display above the player graphic- Source:
packages/server/src/Player/ComponentManager.ts - Kind:
method - Defined in:
IComponentManager
Signature
Parameters
layout:ComponentInputoptions?:ComponentLayout
Returns
voidsetGraphic
Set the graphic(s) for this player Allows setting either a single graphic or multiple graphics for the player. When multiple graphics are provided, they are used for animation sequences. The graphics system provides flexible visual representation that can be dynamically changed during gameplay for different states, equipment, or animations.- Source:
packages/server/src/Player/ComponentManager.ts - Kind:
method - Defined in:
IComponentManager
Signature
Parameters
graphic:string | string[]
Returns
voidExamples
WithComponentManager
Component Manager Mixin Provides graphic and component management capabilities to any class. This mixin allows setting single or multiple graphics for player representation, enabling dynamic visual changes and animation sequences. It also provides methods to display UI components around the player graphic (top, bottom, center, left, right). Components are stored as JSON strings for efficient synchronization.- Source:
packages/server/src/Player/ComponentManager.ts - Kind:
function
Signature
Parameters
Base:TBase