Skip to content

Instantly share code, notes, and snippets.

@samme
Last active September 2, 2017 10:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samme/161251e1688d7671b44eb34a4f9da42c to your computer and use it in GitHub Desktop.
Save samme/161251e1688d7671b44eb34a4f9da42c to your computer and use it in GitHub Desktop.
Phaser Sprite Lifecycle
alive exists fresh health renderable visible
sprite.exists = false
sprite.exists = true ✔️ ✔️
sprite.kill()
sprite.revive(…) ✔️ ✔️ 1* ✔️
sprite.reset(…) ✔️ ✔️ ✔️ 1* ✔️ ✔️
group.create(…) ✔️* ✔️* ✔️*
group.createMultiple(…) ❌* ❌* ❌*
group.resetChild(…, x, y) ✔️ ✔️ ✔️ 1 ✔️ ✔️

✔️: true
❌: false
*: or as passed

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment