Ejemplo n.º 1
0
        public void TickAndReset()
        {
            var d = new RandomDuration(1);

            TickFirstHalfTest(d, 0);

            d.Tick(0.2f);
            TickFirstHalfTest(d, 0.2f);

            d.Tick(0.2f);
            TickFirstHalfTest(d, 0.4f);


            d.Tick(0.2f);
            TickSecondHalfTest(d, 0.6f);

            d.Tick(0.2f);
            TickSecondHalfTest(d, 0.8f);


            d.Tick(0.3f);
            TickFinishedTest(d);


            d.Reset();


            TickFirstHalfTest(d, 0);

            d.Tick(0.2f);
            TickFirstHalfTest(d, 0.2f);

            d.Tick(0.2f);
            TickFirstHalfTest(d, 0.4f);


            d.Tick(0.2f);
            TickSecondHalfTest(d, 0.6f);

            d.Tick(0.2f);
            TickSecondHalfTest(d, 0.8f);


            d.Tick(0.3f);
            TickFinishedTest(d);
        }
Ejemplo n.º 2
0
        public void Tick1()
        {
            var d = new RandomDuration(1);

            TickFirstHalfTest(d, 0);

            d.Tick(0.1f);
            TickFirstHalfTest(d, 0.1f);

            d.Tick(0.1f);
            TickFirstHalfTest(d, 0.2f);

            d.Tick(0.1f);
            TickFirstHalfTest(d, 0.3f);

            d.Tick(0.1f);
            TickFirstHalfTest(d, 0.4f);

            d.Tick(0.1f);
            TickFirstHalfTest(d, 0.5f);


            d.Tick(0.1f);
            TickSecondHalfTest(d, 0.6f);

            d.Tick(0.1f);
            TickSecondHalfTest(d, 0.7f);

            d.Tick(0.1f);
            TickSecondHalfTest(d, 0.8f);

            d.Tick(0.1f);
            TickSecondHalfTest(d, 0.9f);

            d.Tick(0.1f);
            TickFinishedTest(d);
        }