示例#1
0
		WaypointFigurine InsertFigurine(LinkedListNode<WaypointFigurine> last, WaypointEntry wp)
		{
			Figurine lastFig;
			Figurine nextFig;
			var newFig = new WaypointFigurine(this, wp);
			if (last == null)
			{
				// first WP
				lastFig = m_figurine;
				nextFig = m_wpFigurines.First.Value;
			}
			else
			{
				lastFig = last.Value;
				nextFig = last.Next.Value;
			}

			if (lastFig != null)
			{
				lastFig.SetOrientationTowards(newFig);
				lastFig.ChannelObject = newFig;
				lastFig.ChannelSpell = ConnectingSpell;
			}
			if (nextFig != null)
			{
				newFig.SetOrientationTowards(nextFig);
				newFig.ChannelObject = nextFig;
				newFig.ChannelSpell = ConnectingSpell;
			}

			m_wpFigurines.AddLast(newFig);
			Region.AddObjectLater(newFig);
			return newFig;
		}
示例#2
0
		private void AddWPFigurines()
		{
			Figurine last = m_figurine;
			m_wpFigurines = new LinkedList<WaypointFigurine>();
			foreach (var wp in SpawnEntry.Waypoints)
			{
				var figurine = new WaypointFigurine(this, wp);
				last.Orientation = last.GetAngleTowards(wp);
				last.ChannelObject = figurine;
				last.ChannelSpell = ConnectingSpell;

				last = figurine;
				m_wpFigurines.AddLast(figurine);
				Region.AddObjectLater(figurine);
			}
		}