A generic hud element shown on the screen
const hud_element = new HudElement({ name: 'watermark', point: Point.top_left(), font: Font.default(), text: `"Hello world!"`}); Copy
const hud_element = new HudElement({ name: 'watermark', point: Point.top_left(), font: Font.default(), text: `"Hello world!"`});
export
Initializes the hud element in gsc
export const init = [ hud_element.init(),]; Copy
export const init = [ hud_element.init(),];
Sets the alpha of this HudElement.
hud_element.setAlpha(0.5); Copy
hud_element.setAlpha(0.5);
Updates the hud element with new_text in gsc
new_text
export const update = [ hud_element.update(`"Player Score: " + self.score`),]; Copy
export const update = [ hud_element.update(`"Player Score: " + self.score`),];
Generated using TypeDoc
Description
A generic hud element shown on the screen
Example