예제 #1
0
        public void ParallaxTDDSimplePasses(float concurrentRect, float multipli, float result)
        {
            var view = Substitute.For <IControllerParallaxView>();

            view.GetDeltaTime().Returns(1f);
            ParalaxLogic logicParallax = new ParalaxLogic(view, 1);

            Assert.AreEqual(result, logicParallax.MoveParallax(concurrentRect, multipli), $"The calc to this parallax is moved");
        }
예제 #2
0
 private Rect CreateRect(RawImage image, float speedRelative)
 {
     return(new Rect(logic.MoveParallax(image.uvRect.x, speedRelative), zero, one, one));
 }