예제 #1
0
        /// <summary>
        /// Adding special handling for walking to a point for patrol guards to be in a formation
        /// </summary>
        /// <param name="tx"></param>
        /// <param name="ty"></param>
        /// <param name="tz"></param>
        /// <param name="speed"></param>
        public override void WalkTo(int tx, int ty, int tz, short speed)
        {
            int offX = 0; int offY = 0;

            if (IsMovingOnPath && PatrolGroup != null)
            {
                PatrolGroup.GetMovementOffset(this, out offX, out offY);
            }
            base.WalkTo(tx - offX, ty - offY, tz, speed);
        }
예제 #2
0
        /// <summary>
        /// Adding special handling for walking to a point for patrol guards to be in a formation
        /// </summary>
        public override void WalkTo(Vector3 target, short speed)
        {
            int offX = 0;
            int offY = 0;

            if (IsMovingOnPath && PatrolGroup != null)
            {
                PatrolGroup.GetMovementOffset(this, out offX, out offY);
            }
            base.WalkTo(target - new Vector3(offX, offY, 0), speed);
        }