LÖVE-Callbacks und Spielzustände
Verbindet Initialisierung, Updates, Zeichnen und Eingaben zu einem konsistenten Zustandsablauf. Entkoppelt Bewegung von Zeichenfrequenz und definiert verbrauchte Aktionen während Pause und Bildschirmwechsel.
love-callbacks-state
Entdecke, wie der Skill hilftWann ist der Skill hilfreich?
Nutze dies bei bildratenabhängigem Verhalten nach Neustart oder Pause.
Wobei hilft er dir?
- Ordnet Initialisierung, Aktualisierung, Zeichnen und Eingabe eindeutig zu.
- Verteilt Zustandsverhalten über eine kleine konsistente Modulschnittstelle.
- Definiert sekundengestützte Zeit und Eingabebehandlung während Pausen.
Das könntest du fragen
Baue Titel-, Spiel-, Pausen- und Niederlagezustände für unseren Lua-Plattformer. Halte Springen beim Pausenöffnen, ändere die Fenstergröße und setze fort. Kein doppelter Sprung, keine Punkteänderung in draw und kein temporärer Zustand der alten Runde nach Neustart.
Ausführliche Dokumentation
Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.
Weniger anzeigen
LÖVE — callbacks state
Use when implementing LÖVE callbacks, Lua game states, pause or restart.
Version and project gate
Inspect conf.lua and main.lua, LÖVE and Lua/LuaJIT versions, callback definitions, modules, filesystem identity, graphics/audio APIs, .love packaging and native extension dependencies. Distinguish color/API conventions across major releases. Never turn a task into an engine upgrade without the user’s intent. Read the version-matching official reference when an API decision depends on it.
Work
Keep initialization, update, drawing and input callbacks under one explicit owner. Dispatch state behavior through a small module contract, preserving existing project style. Declare seconds-based timing and pause semantics; customize love.run only when the ordinary loop cannot satisfy the requirement.
Deliver
A callback/state map and complete menu-play-pause-restart behavior. Keep the change in the existing project structure; separate actual observations from the proposed acceptance scenario below.
Failure to prevent
Updating gameplay during draw or replacing a callback accidentally through a module import can make behavior frame-dependent.
Acceptance scenario
Restart repeatedly, pause with input held and compare a timed movement sequence at varied render rates. Follow the project’s execution and verification permissions. If execution or a target device is unavailable, provide the reproduction steps and name the remaining uncertainty; do not mark it passed.
Scope and sources
This skill belongs to Lilt. Agent selection is restricted by Orqestria’s assigned-agent policy, including forced skill selection; instruction text alone is not an access control. These are original task workflows researched from official documentation, not a copied or endorsed vendor skill.
Enthaltene Dateien 1
SKILL.md
