Exemplo n.º 1
0
        public void StepTest0()
        {
            Scene scene = new Scene();
            Portalable p = new Portalable(scene);
            Transform2 start = new Transform2(new Vector2(1, 5), 2.3f, 3.9f);
            Transform2 velocity = Transform2.CreateVelocity(new Vector2(-3, 4), 23, 0.54f);
            p.SetTransform(start);
            p.SetVelocity(velocity);
            PortalCommon.UpdateWorldTransform(new IPortalCommon[] { p });
            SimulationStep.Step(new IPortalCommon[] { p }, new IPortal[0], 1, null);

            Assert.IsTrue(p.GetTransform().AlmostEqual(start.Add(velocity)));
        }