コード例 #1
0
        public void CalculateIntensity_LinearOneToZeroAtTimeZero_IsOne()
        {
            var modulator = new CurveTimeModulator(linearOneToZero, 3.0f);
            var intensity = modulator.CalculateIntensity(RumbleIntensity.One, 0.0f);

            Assert.That(intensity, Is.EqualTo(RumbleIntensity.One));
        }
コード例 #2
0
        public void CalculateIntensity_HalfTimeAfterLoop_IsHalf()
        {
            var modulator = new CurveTimeModulator(linearOneToZero, 2.0f);
            var intensity = modulator.CalculateIntensity(RumbleIntensity.One, 3.0f);

            Assert.That(intensity, Is.EqualTo(
                            new RumbleIntensity(
                                ForceFeedbackIntensities.One * 0.5f,
                                ScreenShakeIntensities.One * 0.5f)));
        }