示例#1
0
        public void GetZoneBorderFromPointCanGetBorder()
        {
            const string targetZoneName = "B";
            var          want           = ExampleWorld.ZoneA().Boundaries.Find(b => b.ToZone == targetZoneName);
            var          fromPosition   = want.FromPosition;
            var          targetPosition = want.ToPosition;
            var          traveler       = new Traveler
            {
                CurrentZone = ExampleWorld.ZoneA(),
                Position    = Vector3.Zero,
                World       = ExampleWorld.Sample()
            };
            var got = traveler.GetZoneBorderToNameFromPoint(fromPosition);

            Assert.Equal(want, got);
        }