Skip to content

Commit

Permalink
feat(phaserx): tag native phaser game objects with object pool id (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kooshaba authored Mar 1, 2023
1 parent 398db9a commit 27ac5d3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/phaserx/src/createEmbodiedEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export function createEmbodiedEntity<Type extends keyof GameObjectTypes>(
gameObject.setAlpha(1);
gameObject.setScrollFactor(1);
gameObject.clearMask();
gameObject.setData("objectPoolId", null);
if (isSprite(gameObject, type)) {
gameObject.clearTint();
gameObject.setTexture("");
Expand Down Expand Up @@ -119,6 +120,7 @@ export function createEmbodiedEntity<Type extends keyof GameObjectTypes>(

gameObject.setActive(true);
gameObject.setVisible(true);
gameObject.setData("objectPoolId", id);
activeGameObject = gameObject;
}

Expand Down

0 comments on commit 27ac5d3

Please sign in to comment.