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