Esempio n. 1
0
        public void SettingDrawAreaWithoutInterpolationSetsLastDrawAreaAlso()
        {
            var entity = new Entity2D(Rectangle.One);

            Assert.AreEqual(Rectangle.One, entity.LastDrawArea);
            entity.SetWithoutInterpolation(Rectangle.HalfCentered);
            Assert.AreEqual(Rectangle.HalfCentered, entity.DrawArea);
            Assert.AreEqual(Rectangle.HalfCentered, entity.LastDrawArea);
        }
Esempio n. 2
0
        public void SettingColorWithoutInterpolationSetsLastColorAlso()
        {
            var entity = new Entity2D(Rectangle.Zero)
            {
                Color = Color.Green
            };

            Assert.AreEqual(Color.Green, entity.LastColor);
            entity.SetWithoutInterpolation(Color.Blue);
            Assert.AreEqual(Color.Blue, entity.Color);
            Assert.AreEqual(Color.Blue, entity.LastColor);
        }