Animations

com.cupkekgames.animations — backend-agnostic animation contracts (interfaces) and per-context time-scaling hooks. Pair with a bridge package (e.g. com.cupkekgames.animations.animancer) for a concrete implementation.

Kind-driven character animation

State-based character animation is dispatched through a single entry point:

csharp
animationStateController.Play(AnimationKinds.Idle); animationStateController.Play(AnimationKinds.GetHit); animationStateController.PlayClipWithReturnToIdle(emoteClip);

Kinds are open string keys. Reserved ones (Idle, Walk, GetHit, Death, Win) live in AnimationKinds; domain games add new kinds (Cast, Bow, Cheer, Gather, …) by registering (kind, clip) entries on the bridge adapter and calling Play(myKind). The interface never grows.

PlayClipWithReturnToIdle is the escape hatch for one-shot clips not authored in the controller's catalog (emotes, gathering animations, custom skill clips) — it auto-fades back to Idle on completion.

What's inside

  • IAnimationStateController — kind-driven entry point for character animation. Play(kind) / PlayClipWithReturnToIdle(clip) / Transform / OnAnimationPlayed.
  • AnimationKinds — reserved kind constants (open catalog).
  • IAnimationEngine — lower-level contract for raw clip playback with optional layer + return-clip composition.
  • IAnimationTimeController — per-instance time-scaling integrated with CupkekGames.TimeSystem (Pause / Resume / SetPlaySpeed / RegisterTimeContext).
  • AnimationClipData[Serializable] clip + fade-duration pair used by both contracts.

Asmdef + namespace

CupkekGames.Animations (runtime). Pluralized from the original CupkekGames.Animation to avoid shadowing UnityEngine.Animation.

Dependencies

None.

Bridge implementations

Repository

Cupkek-Games/CupkekGames-Animations

Settings

Theme

Light

Contrast

Material

Dark

Dim

Material Dark

System

Sidebar(Light & Contrast only)

Light
Dark

Font Family

DM Sans

Wix

Inclusive Sans

AR One Sans

Direction

LTR
RTL