public override TerminationNode Resolve(IReadOnlyReanimatorState previousState, ReanimatorState nextState) { AddTrace(nextState); nextState.Merge(drivers); return(nodes[controlDriver.ResolveDriver(previousState, nextState, nodes.Length)] .Resolve(previousState, nextState)); }
public virtual void ApplyToRenderer( ReanimatorState previousState, ReanimatorState nextState, SpriteRenderer renderer ) { nextState.Merge(drivers); renderer.sprite = sprite; renderer.flipX = previousState.ShouldFlip(); }
public void ApplyToRenderer( ReanimatorState previousState, ReanimatorState nextState, SpriteRenderer renderer ) { nextState.Merge(drivers); renderer.sprite = previousState.ShouldFlip() ? spriteLeft : sprite; renderer.flipX = false; }
public void ShouldAutoIncrementAnimation() { _previousState.Clear(); _nextState.Clear(); var firstFrame = _testedNode.ResolveCel(_previousState, _nextState); _previousState.Merge(_nextState); _nextState.Clear(); var secondFrame = _testedNode.ResolveCel(_previousState, _nextState); Assert.AreEqual(firstFrame, _keyframes[0]); Assert.AreEqual(secondFrame, _keyframes[1]); }
public override ICel ResolveCel(IReadOnlyReanimatorState previousState, ReanimatorState nextState) { nextState.Merge(drivers); return(cels[controlDriver.ResolveDriver(previousState, nextState, cels.Length)]); }
public override TerminationNode Resolve(IReadOnlyReanimatorState previousState, ReanimatorState nextState) { AddTrace(nextState); nextState.Merge(drivers); return(this); }