An animation asset is a list of pictures (whole textures or frames) with frames per second and Loop/Once/Ping-pong playback. A sprite wears it through its texture property, so the picker, instance overrides and the Properties node work unchanged; there is no dedicated play node. A different animation starts from its first frame, the same one set again runs on, so a graph may choose Run or Idle every frame. The clock lives on the entity, not in props, which the world writes back as overrides. The AnimationSystem ticks before behaviors, and On animation finished fires once when a Once animation reaches its end. The Animation tab plays a preview above a frame strip: reorder by dragging, Delete, duplicate, + Frames, pause/resume, and wheel zoom about the pointer with pan and Fit. Scene and Container tabs show the first frame; edit mode has no clock. Right-clicking a texture creates an animation from its frames. Button now measures its label with the bold font it draws in, which cut the Animation tab and red dialog buttons short. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
936 B
936 B
Sprite-Animation: Frames einer Textur nacheinander abspielen.
Stand: Texturen lassen sich schon in Frames schneiden (Slice-Dialog), aber ein Sprite zeigt immer genau einen Frame. Nichts spielt sie ab.
Abzuklären:
- wo die Animation wohnt: eigenes Asset (Frame-Liste + fps + Loop) oder Properties direkt am Sprite
- wie man sie im Graph steuert (starten/stoppen, anderen Clip wählen, "fertig"-Event)
- Vorschau im Editor oder erst im Play
Entschieden (User-Wahl):
- Eigenes Animation-Asset (Bildliste + fps + Loop/Once/Ping-pong) mit eigenem Tab; das Sprite trägt es über
texture. - Kein eigener Node: gewechselt wird per
Properties(Sprite,textureauf Set). Eine andere Animation startet von vorn, dieselbe läuft weiter. DazuOn animation finished. - Scene/Container zeigen den ersten Frame, der Animation-Tab spielt ab, im Play läuft alles.
- State-Machine und ein Neustart-Node erst, wenn ein Spiel sie braucht.