Creates a Sprite instance wrapped as an entity for logic support.
Optional
const player = asEntitySprite( { texture }, { x: 100, y: 100, anchor: 0.5 });player.moxiEntity.addLogic(new PlayerController());scene.addChild(player); Copy
const player = asEntitySprite( { texture }, { x: 100, y: 100, anchor: 0.5 });player.moxiEntity.addLogic(new PlayerController());scene.addChild(player);
Creates a Sprite instance wrapped as an entity for logic support.