Exemple #1
0
        /// <summary>
        /// we dont want to render our bounds so we just render a direction
        /// </summary>
        /// <param name="batcher">Batcher.</param>
        public override void DebugRender(Batcher batcher)
        {
            // figure out a starting corner for the line
            var root = Vector2.Zero;

            if (Direction.Y > 0)
            {
                root.Y = 10f;
            }
            else
            {
                root.Y = Screen.Height - 10;
            }

            if (Direction.X > 0)
            {
                root.X = 10;
            }
            else
            {
                root.X = Screen.Width - 10;
            }

            var angle = Mathf.Atan2(Direction.Y, Direction.X);

            batcher.DrawLineAngle(root, angle, 100, Color.Red, 3);
        }
Exemple #2
0
        public override void DebugRender(Batcher batcher)
        {
            base.DebugRender(batcher);

            if (target != null)
            {
                batcher.DrawLineAngle(Transform.Position, Mathf.AngleBetweenVectors(this.Position, target.Position), 10, Color.Red);
            }

            batcher.DrawCircle(this.Position, 100f, Color.Red);
        }