Ejemplo n.º 1
0
 public override TerminationNode Resolve(IReadOnlyReanimatorState previousState, ReanimatorState nextState)
 {
     AddTrace(nextState);
     nextState.Merge(drivers);
     return(nodes[controlDriver.ResolveDriver(previousState, nextState, nodes.Length)]
            .Resolve(previousState, nextState));
 }
Ejemplo n.º 2
0
 public virtual void ApplyToRenderer(
     ReanimatorState previousState,
     ReanimatorState nextState,
     SpriteRenderer renderer
     )
 {
     nextState.Merge(drivers);
     renderer.sprite = sprite;
     renderer.flipX  = previousState.ShouldFlip();
 }
Ejemplo n.º 3
0
 public void ApplyToRenderer(
     ReanimatorState previousState,
     ReanimatorState nextState,
     SpriteRenderer renderer
     )
 {
     nextState.Merge(drivers);
     renderer.sprite = previousState.ShouldFlip() ? spriteLeft : sprite;
     renderer.flipX  = false;
 }
Ejemplo n.º 4
0
        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]);
        }
Ejemplo n.º 5
0
 public override ICel ResolveCel(IReadOnlyReanimatorState previousState, ReanimatorState nextState)
 {
     nextState.Merge(drivers);
     return(cels[controlDriver.ResolveDriver(previousState, nextState, cels.Length)]);
 }
Ejemplo n.º 6
0
 public override TerminationNode Resolve(IReadOnlyReanimatorState previousState, ReanimatorState nextState)
 {
     AddTrace(nextState);
     nextState.Merge(drivers);
     return(this);
 }