Vixen
02b45cc4
csharp
public sealed class RuleTransitionPolicy

The shipped policy: an ordered list of rules, first match wins.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

A rule list rather than a table of pairs. A pairwise table over N moves is N² cells that nobody fills in; a rule list is a dozen sentences somebody can read:

run → * : 0.20 s, phase-synced * → stop_* : 0.12 s injured:* → * : 0.35 s # everything an injured character does starts slowly * → * : 0.25 s # default

Same first-match-wins shape as a VCSS selector, and the authoring tool shows which rule matched for a chosen pair the way a style inspector does.

Fields and properties (2)

  • public static RuleTransitionPolicy Shared

    A policy with no rules, which crossfades everything over a quarter of a second.

  • public ReadOnlySpan<TransitionRule> Rules

    The rules, in order.

Methods (3)

  • public RuleTransitionPolicy(params ReadOnlySpan<TransitionRule> rules)

    Creates a policy from an ordered list of rules.

  • public bool TryResolve(MoveEntry? from, MoveEntry into, out TransitionSpec spec)

    Decides what happens between two moves.

  • public int RuleFor(MoveEntry? from, MoveEntry into)

    Which rule decides a pair, for an editor that has to explain itself.

Used by (5)

  • LoadPathTestsVixen.Animation.Tests
  • MoveSetContentVixen.Animation
  • MoveSetMotionVixen.Animation
  • MoveTransitionTestsVixen.Animation.Tests
  • MoveSetImporterTestsVixen.Editor.Assets.Tests