Exemple #1
0
		public void SettingOrientationWithoutInterpolationSetsLastOrientationAlso()
		{
			var entity = new MockEntity3D(Vector3D.Zero, Orientation1);
			Assert.AreEqual(Orientation1, entity.GetLastOrientation());
			entity.SetWithoutInterpolation(Orientation2);
			Assert.AreEqual(Orientation2, entity.Orientation);
			Assert.AreEqual(Orientation2, entity.GetLastOrientation());
		}
Exemple #2
0
		public void SettingPositionWithoutInterpolationSetsLastPositionAlso()
		{
			var entity = new MockEntity3D(Vector3D.One);
			Assert.AreEqual(Vector3D.One, entity.GetLastPosition());
			entity.SetWithoutInterpolation(Vector3D.UnitX);
			Assert.AreEqual(Vector3D.UnitX, entity.Position);
			Assert.AreEqual(Vector3D.UnitX, entity.GetLastPosition());
		}
        public void SettingOrientationWithoutInterpolationSetsLastOrientationAlso()
        {
            var entity = new MockEntity3D(Vector3D.Zero, Orientation1);

            Assert.AreEqual(Orientation1, entity.GetLastOrientation());
            entity.SetWithoutInterpolation(Orientation2);
            Assert.AreEqual(Orientation2, entity.Orientation);
            Assert.AreEqual(Orientation2, entity.GetLastOrientation());
        }
        public void SettingPositionWithoutInterpolationSetsLastPositionAlso()
        {
            var entity = new MockEntity3D(Vector3D.One);

            Assert.AreEqual(Vector3D.One, entity.GetLastPosition());
            entity.SetWithoutInterpolation(Vector3D.UnitX);
            Assert.AreEqual(Vector3D.UnitX, entity.Position);
            Assert.AreEqual(Vector3D.UnitX, entity.GetLastPosition());
        }
        public void SettingFloatWithoutInterpolationSetsLastFloatAlso()
        {
            var entity = new MockEntity3D(Vector3D.Zero);

            entity.Add(90.0f);
            Assert.AreEqual(90.0f, entity.GetLastTickLerpComponents()[0]);
            entity.SetWithoutInterpolation(180.0f);
            Assert.AreEqual(180.0f, entity.Get <float>());
            Assert.AreEqual(180.0f, entity.GetLastTickLerpComponents()[0]);
        }
Exemple #6
0
		public void SettingFloatWithoutInterpolationSetsLastFloatAlso()
		{
			var entity = new MockEntity3D(Vector3D.Zero);
			entity.Add(90.0f);
			Assert.AreEqual(90.0f, entity.GetLastTickLerpComponents()[0]);
			entity.SetWithoutInterpolation(180.0f);
			Assert.AreEqual(180.0f, entity.Get<float>());
			Assert.AreEqual(180.0f, entity.GetLastTickLerpComponents()[0]);
		}