예제 #1
0
        /// <summary>
        /// Updates the plot location on canvas based on Item's current position.
        /// </summary>
        public void Update()
        {
            try
            {
                Morph.Update(Actor.Position);

                if (Actor.IsUnit || Actor.IsProjectile || Actor.AvoidanceType == AvoidanceType.Arcane)
                {
                    HeadingVectorAtRadius = MathEx.GetPointAt(new Vector3(Actor.Position.X, Actor.Position.Y, 0), Actor.Radius, Actor.Movement.GetHeadingRadians());
                    HeadingPointAtRadius = new PointMorph(HeadingVectorAtRadius, Morph.CanvasData).Point;
                }
            }
            catch (Exception ex)
            {
                Logger.Log("Exception in RadarUI.TrinityItemPoint.Update(). {0} {1}", ex.Message, ex.InnerException);
            }
        }
 public static void RelativeMove(DrawingGroup group, Vector3 origin, CanvasData canvasData = null)
 {
     var originPoint = new PointMorph(origin, CanvasData.LastCanvas);
     var transform = new TranslateTransform(originPoint.Point.X - CanvasData.LastCanvas.Center.X, originPoint.Point.Y - CanvasData.LastCanvas.Center.Y);
     group.Transform = transform;
 }