Пример #1
0
        public void RemoveWaypointNext_Removes_next_in_list()
        {
            var thirdValue = navMesh.WaypointList.First.Next.Next;

            navMesh.RemoveWaypointNext();
            navMesh.SetNextWaypoint();
            Assert.AreEqual(thirdValue.Value, navMesh.CurrentWaypoint.Value);
        }
Пример #2
0
        public void RemoveWaypointNext_Leaves_current_as_null_when_removing_last_remaining_element()
        {
            var navMesh = new NavMesh2D(new List <Vector2> {
                new Vector2(0, 0)
            });

            navMesh.IsClosedNavMesh = true;
            navMesh.RemoveWaypointNext();
            Assert.AreEqual(null, navMesh.CurrentWaypoint);
        }
Пример #3
0
 public void RemoveWaypointNext_On_empty_navmesh_throws_exception()
 {
     emptyNavMesh.RemoveWaypointNext();
 }