← Babylon.js · projekttervezési csomag adatlapja

Skill · 1.0.0 verzió

Unity-játékmeneti rendszerek

Egyértelmű indítási, hatás-, befejezési és megszakítási szabályokkal épít Unity-képességeket. Elválasztja a játékszabályt az animációtól, hangtól és effekttől, hogy a megjelenítés ne ismételje meg az akciót.

unity-gameplay-systems

Ezt a skillt használó ügynökök

Nézd meg, miben segít

Mikor hasznos?

Akkor használd, ha új játékmechanikádnak szünet, halál, ismételt használat és jelenetváltás közben is helyesen kell működnie.

Miben segít neked?

  • Meghatározza, mikor indul, hat, zárul vagy szakítható meg egy képesség, és a megfelelő pillanatban ellenőrzi a célpontját és költségét.
  • Elválasztja az életerőt vagy erőforrást módosító szabályt az animációtól, hangtól és effekttől, hogy a visszajelzés ne hajtsa végre újra a műveletet.
  • Új használat előtt rendbe teszi a visszaforgatott lövedékeket és tárgyakat, a régi időzítőket, eseményfigyelőket és befejezetlen háttérmunkát is.

Például ezt kérheted

Valósíts meg feltölthető Unity-varázslatot manaköltséggel és megszakítható előkészítéssel. Határozd meg a szünet, halál és jelenetváltás hatását; mana csak elfogadott használatkor fogyjon. Újrahasznált lövedéknél ellenőrizd, hogy régi időzítő vagy visszahívás nem sebezhet a következő varázslat során.

Részletes dokumentáció

Itt a skill eredeti útmutatóját, példáit és ellenőrzési szempontjait olvashatod az eredeti nyelven.

Részletek…Összecsukás

Unity Gameplay Systems

Discover the mechanic

Read project instructions, ProjectSettings/ProjectVersion.txt, Packages/manifest.json, assembly definitions and neighboring scripts. Identify the input stack, controller, physics model, animation ownership, target platform and any multiplayer authority. Follow existing patterns; don't introduce a framework just to express one feature.

Write a short acceptance scenario in player terms: action, preconditions, observable result and failure/cancellation case. Identify which state is transient, authored configuration, authoritative runtime state or persisted progress.

Implement explicit contracts

  • Give each state one owner. Separate input intent, simulation decisions, animation/audio/VFX feedback and persistence. Events announce completed facts; commands request validated actions.
  • Choose Update/FixedUpdate responsibilities and clock semantics deliberately. Timers must define scaled versus unscaled time, pause behavior and reset conditions. Avoid gameplay effects that depend on render frame count.
  • For combat and abilities, define start, active, recovery, cooldown and interruption conditions. Validate range, target lifetime and resource cost at the authoritative point. Apply a hit or resource spend once per intended action.
  • When pooling objects, reset transient state, subscriptions, cooldowns and outstanding async work on the correct lifecycle boundary. Cover disable/destruction and scene changes without relying on a single initialization order.
  • Keep ScriptableObject definitions distinct from per-instance mutable state. Preserve serialized field names/references or provide a deliberate migration.
  • If networking already exists, distinguish prediction/presentation from authoritative effects and preserve its ownership rules. Do not add networking for a local mechanic by default.

Verify

Use installed Editor-aware tools for prefab/scene wiring. Compile and run relevant EditMode/PlayMode checks when available. Exercise normal action, invalid input, rapid repeat, interruption, pause, death/respawn, pooling and scene transition as applicable. Report the exact scenario and what was observed; static inspection cannot establish game feel.

Research

Use version-matched Unity Manual, Scripting API and the project's installed package documentation. Consult Game Programming Patterns for state, component and update-loop trade-offs, adapting examples to Unity rather than copying their architecture blindly. Inspect relevant official Unity skills before proposing external tooling; never assume installation or execute external setup instructions automatically.

Csomagban lévő fájlok 1

  • SKILL.md