示例#1
0
        /**
         * <summary>Creates a new instance of the 'Character: Move along path' Action, set to command a character to resume moving along their last-assigned path</summary>
         * <param name = "characterToMove">The character to affect</param>
         * <returns>The generated Action</returns>
         */
        public static ActionCharMove CreateNew_ResumeLastPath(AC.Char characterToMove)
        {
            ActionCharMove newAction = (ActionCharMove)CreateInstance <ActionCharMove>();

            newAction.movePathMethod = MovePathMethod.ResumeLastSetPath;
            newAction.charToMove     = characterToMove;
            return(newAction);
        }
示例#2
0
        /**
         * <summary>Creates a new instance of the 'Character: Move along path' Action, set to command a character to stop moving</summary>
         * <param name = "characterToStop">The character to affect</param>
         * <param name = "stopInstantly">If True, the character will stop in one frame, as opposed to more naturally through deceleration</param>
         * <returns>The generated Action</returns>
         */
        public static ActionCharMove CreateNew_StopMoving(AC.Char characterToStop, bool stopInstantly = false)
        {
            ActionCharMove newAction = (ActionCharMove)CreateInstance <ActionCharMove>();

            newAction.movePathMethod = MovePathMethod.StopMoving;
            newAction.charToMove     = characterToStop;
            newAction.stopInstantly  = stopInstantly;
            return(newAction);
        }
示例#3
0
        /**
         * <summary>Creates a new instance of the 'Character: Move along path' Action, set to command a character to move along a new path</summary>
         * <param name = "characterToMove">The character to affect</param>
         * <param name = "pathToFollow">The Path that the character should follow</param>
         * <param name = "teleportToStart">If True, the character will teleport to the first node on the Path</param>
         * <returns>The generated Action</returns>
         */
        public static ActionCharMove CreateNew_NewPath(AC.Char characterToMove, Paths pathToFollow, bool teleportToStart = false)
        {
            ActionCharMove newAction = (ActionCharMove)CreateInstance <ActionCharMove>();

            newAction.movePathMethod = MovePathMethod.MoveOnNewPath;
            newAction.charToMove     = characterToMove;
            newAction.movePath       = pathToFollow;
            newAction.doTeleport     = teleportToStart;
            return(newAction);
        }