Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
let messages;
export default class HUD extends Node {
public onStart(): void {
messages = new TextBlock();
messages.name = "game messages";
messages.textHorizontalAlignment = TextBlock.HORIZONTAL_ALIGNMENT_CENTER;
messages.fontSize = "60px";
messages.color = "white";
messages.text = "Press Space key";
messages.resizeToFit = true;
messages.height = "150px";
messages.width = "220px";
messages.fontFamily = "Viga";
stackPanel.addControl(messages);
}
}
export function showMessages(x:string){
messages.text=x;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment