@moxijs/core - v0.3.4
    Preparing search index...

    Function asEntitySprite

    • Creates a Sprite instance wrapped as an entity for logic support.

      Parameters

      Returns AsEntity<Sprite>

      const player = asEntitySprite(
      { texture },
      { x: 100, y: 100, anchor: 0.5 }
      );
      player.moxiEntity.addLogic(new PlayerController());
      scene.addChild(player);