Пример #1
0
        private void UpdateDistanceDisplay()
        {
            int numberOfLinks = mNodeGrabbed.Links.Count;

            while (mDistanceDisplay.Count < numberOfLinks)
            {
                mDistanceDisplay.Add(TextManager.AddText(""));
            }

            for (int i = 0; i < numberOfLinks; i++)
            {
#if FRB_MDX
                mDistanceDisplay[i].Position =
                    Vector3.Scale((mNodeGrabbed.Position + mNodeGrabbed.Links[i].NodeLinkingTo.Position), .5f);
#else
                mDistanceDisplay[i].Position = (mNodeGrabbed.Position + mNodeGrabbed.Links[i].NodeLinkingTo.Position) * .5f;
#endif
                mDistanceDisplay[i].DisplayText =
                    (mNodeGrabbed.Position - mNodeGrabbed.Links[i].NodeLinkingTo.Position).Length().ToString();
            }
        }