Ejemplo n.º 1
0
        /// <summary>
        /// Gets the Direction that this Unit would need to turn to face the given direction.
        /// Note that this does not modify the Unit in any way, and should be used for analytic purposes only.
        /// This method takes mirroring into account - use with caution
        /// </summary>
        /// <param name="to">the CardinalDirection that this Unit would face after turning</param>
        /// <returns>the RelativeDirection to turn to face the Direction</returns>
        public RelativeDirection Cross(CardinalDirection to)
        {
            var cross = Facing.Cross(to);

            return(Mirrored ? cross.Mirror() : cross);
        }