Creates a Text instance wrapped as an entity for logic support.
Optional
const label = asEntityText( { text: 'Score: 0', style: { fontFamily: 'Arial', fontSize: 24 } }, { x: 10, y: 10 });label.moxiEntity.addLogic(new ScoreDisplay());scene.addChild(label); Copy
const label = asEntityText( { text: 'Score: 0', style: { fontFamily: 'Arial', fontSize: 24 } }, { x: 10, y: 10 });label.moxiEntity.addLogic(new ScoreDisplay());scene.addChild(label);
Creates a Text instance wrapped as an entity for logic support.