sprite-animations.rst 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. .. include:: ../_header.rst
  2. Sprite animations
  3. -----------------
  4. .. toctree::
  5. :maxdepth: 1
  6. sprite-animations-preview
  7. sprite-animations-aseprite
  8. A `Sprite <sprite-object.html>`_ game object is an image object with the capability of displaying frame-by-frame animations.
  9. In |PhaserEditor|_ there are two workflows for making animations in your game:
  10. .. topic:: Workflow 1
  11. Using the |AnimationsEditor|_. It gets the image frames from an |AssetPackFile|_ and groups the frames into animations. You can set different properties to the animation, like the frame rate, repetitions, delay, etc... and finally, you load the animation file into the |AssetPackFile|_.
  12. .. topic:: Workflow 2
  13. Exporting the animations from the Aseprite_ software. It outputs Asperite animation files that are Phaser-compatible and that you can load in an |AssetPackFile|_.
  14. .. topic:: Finally
  15. Once the animation assets (produced by the |AnimationsEditor|_ or Aseprite_) are defined in the |AssetPackFile|_, you can use them in different tools of the |SceneEditor|_:
  16. * The animation blocks in the |BlocksView|_. You can create a Sprite_ game object by `dropping an animation block into the scene <./sprite-object.html>`_.
  17. .. image:: ../images/scene-editor-sprite-create-from-animation-block-20231023.webp
  18. :alt: Create sprite from animation block
  19. * The `Animation and Animation Configuration sections <animations-properties.html>`_ of the **Inspector** view. It allows playing an animation on a Sprite_ game object.
  20. .. image:: ../images/scene-editor-animations-props-custom-config-20231027.webp
  21. :alt: Animation properties.
  22. * The `Animation Key user property type <prefab-user-properties-animation-key-type.html>`_. It allows selecting the name of an animation defined in an |AssetPackFile|_.
  23. .. image:: ../images/prefab-user-props-animation-key-dialog-20231027.webp
  24. :alt: Animation Key user property