示例#1
0
		public void TestWithMouseDrag()
		{
			var tilemap = new ColoredLogoTilemap(World, Map);
			tilemap.State.DragStart = new Vector2D(0.5f, 0.5f);
			tilemap.State.DragEnd = new Vector2D(0.7f, 0.9f);
			tilemap.Update();
			Assert.IsTrue(tilemap.State.DragDelta.IsNearlyEqual(new Vector2D(0.2f, 0.4f)));
		}
示例#2
0
        public void TestWithMouseDrag()
        {
            var tilemap = new ColoredLogoTilemap(World, Map);

            tilemap.State.DragStart = new Vector2D(0.5f, 0.5f);
            tilemap.State.DragEnd   = new Vector2D(0.7f, 0.9f);
            tilemap.Update();
            Assert.IsTrue(tilemap.State.DragDelta.IsNearlyEqual(new Vector2D(0.2f, 0.4f)));
        }
示例#3
0
        public void TestUpdate()
        {
            var tilemap = new ColoredLogoTilemap(World, Map);

            tilemap.DrawArea        = Rectangle.One;
            tilemap.State.DragStart = new Vector2D(10.5f, 10.5f);
            tilemap.State.DragEnd   = new Vector2D(0.5f, 0.5f);
            tilemap.Update();
            Assert.AreEqual(new Vector2D(-10, -10), tilemap.State.DragDelta);
        }
示例#4
0
		public void TestUpdate()
		{
			var tilemap = new ColoredLogoTilemap(World, Map);
			tilemap.DrawArea = Rectangle.One;
			tilemap.State.DragStart = new Vector2D(10.5f, 10.5f);
			tilemap.State.DragEnd = new Vector2D(0.5f, 0.5f);
			tilemap.Update();
			Assert.AreEqual(new Vector2D(-10, -10), tilemap.State.DragDelta);
		}