Animations ​

csharp
Content.Animation("taco-cheer")
    .Name("Taco Cheer")
    .Hop(0f, 0.5f, 0.6f)
    .Spin(0.5f, 0.5f)
    .Hop(1.0f, 0.4f, 0.35f)
    .OnServe("taco", "veggie-taco", "fish-taco");

Content.Animation("salsa-dance")
    .Name("Salsa Dance")
    .Wiggle(0f, 1.6f, 18f, 4)
    .Key(0f, AnimationChannel.OffsetY, 0f)
    .Key(0.4f, AnimationChannel.OffsetY, 0.12f)
    .Key(0.8f, AnimationChannel.OffsetY, 0f)
    .Emote(1);

The chef who serves a taco hops, spins and hops again. Pressing 1 makes your chef dance.

AnimationBuilder ​

csharp
public sealed class AnimationBuilder
{
    public AnimationBuilder Name(string name);
    public AnimationBuilder Icon(string png);
    public AnimationBuilder Key(float time, AnimationChannel channel, float value);
    public AnimationBuilder Hop(float at, float length, float height);
    public AnimationBuilder Spin(float at, float length, float turns = 1f);
    public AnimationBuilder Wiggle(float at, float length, float degrees = 15f, int times = 2);
    public AnimationBuilder Duration(float seconds);
    public AnimationBuilder OnServe(params string[] recipes);
    public AnimationBuilder OnLevelStart();
    public AnimationBuilder OnLevelEnd();
    public AnimationBuilder Emote(int slot);
}
  • Key: at time seconds the channel has value. Keys on a channel ease into each other; before the first and after the last the channel rests.
  • Channels: OffsetX, OffsetY, OffsetZ (metres), Pitch, Yaw, Roll (degrees), Scale, ScaleY (1 is normal).
  • Hop, Spin, Wiggle: the keys for a hop of height metres, turns full turns, or times leans of degrees each way.
  • Duration: up to 30 seconds; the last key's time by default.
  • OnServe: plays on the chef nearest the pass when one of these recipes is served, or any dish with no recipes given.
  • OnLevelStart, OnLevelEnd: every chef, when the level starts and when time runs out.
  • Emote: slots 1 to 4; the player on the keyboard plays it with that number key.

An animation moves the chef's model, not the chef: the chef keeps running, carrying and chopping while it plays. Serve, start and end animations play on every machine from the same game event, so online every player sees them; an emote shows on the machine that plays it.