Ejemplo n.º 1
0
        public void SetFacing(Vector3 spot)
        {
            TransportPathTransform transform = new TransportPathTransform(unit, args.TransformForTransport);
            Vector3 finalSpot = transform.Calc(spot);

            args.facing.f    = new Vector3(finalSpot.X, finalSpot.Y, finalSpot.Z);
            args.facing.type = MonsterMoveType.FacingSpot;
        }
Ejemplo n.º 2
0
        public void MovebyPath(Vector3[] controls, int path_offset = 0)
        {
            args.path_Idx_offset = path_offset;
            args.path            = new Vector3[controls.Length];
            TransportPathTransform transform = new TransportPathTransform(unit, args.TransformForTransport);

            for (var i = 0; i < controls.Length; i++)
            {
                args.path[i] = transform.Calc(controls[i]);
            }
        }
Ejemplo n.º 3
0
        public void MoveTo(Vector3 dest, bool generatePath = true, bool forceDestination = false)
        {
            if (generatePath)
            {
                PathGenerator path   = new PathGenerator(unit);
                bool          result = path.CalculatePath(dest.X, dest.Y, dest.Z, forceDestination);
                if (result && !Convert.ToBoolean(path.GetPathType() & PathType.NoPath))
                {
                    MovebyPath(path.GetPath());
                    return;
                }
            }

            args.path_Idx_offset = 0;
            args.path            = new Vector3[2];
            TransportPathTransform transform = new TransportPathTransform(unit, args.TransformForTransport);

            args.path[1] = transform.Calc(dest);
        }