예제 #1
0
        /**
         * <summary>Creates a new instance of the 'Scene: Change setting' Action, set to change the OnStart cutscene</summary>
         * <param name = "newCutscene">The new OnStart cutscene</param>
         * <returns>The generated Action</returns>
         */
        public static ActionNavMesh CreateNew_ChangeCutsceneOnStart(Cutscene newCutscene)
        {
            ActionNavMesh newAction = (ActionNavMesh)CreateInstance <ActionNavMesh>();

            newAction.sceneSetting = SceneSetting.OnStartCutscene;
            newAction.cutscene     = newCutscene;
            return(newAction);
        }
예제 #2
0
        /**
         * <summary>Creates a new instance of the 'Scene: Change setting' Action, set to change the current TintMap</summary>
         * <param name = "newTintMap">The new TintMap</param>
         * <returns>The generated Action</returns>
         */
        public static ActionNavMesh CreateNew_ChangeTintMap(TintMap newTintMap)
        {
            ActionNavMesh newAction = (ActionNavMesh)CreateInstance <ActionNavMesh>();

            newAction.sceneSetting = SceneSetting.TintMap;
            newAction.tintMap      = newTintMap;
            return(newAction);
        }
예제 #3
0
        /**
         * <summary>Creates a new instance of the 'Scene: Change setting' Action, set to change the current SortingMap</summary>
         * <param name = "newSortingMap">The new SortingMap</param>
         * <returns>The generated Action</returns>
         */
        public static ActionNavMesh CreateNew_ChangeSortingMap(SortingMap newSortingMap)
        {
            ActionNavMesh newAction = (ActionNavMesh)CreateInstance <ActionNavMesh>();

            newAction.sceneSetting = SceneSetting.SortingMap;
            newAction.sortingMap   = newSortingMap;
            return(newAction);
        }
예제 #4
0
        /**
         * <summary>Creates a new instance of the 'Scene: Change setting' Action, set to change the default PlayerStart</summary>
         * <param name = "newPlayerStart">The new PlayerStart</param>
         * <returns>The generated Action</returns>
         */
        public static ActionNavMesh CreateNew_ChangeDefaultPlayerStart(PlayerStart newPlayerStart)
        {
            ActionNavMesh newAction = (ActionNavMesh)CreateInstance <ActionNavMesh>();

            newAction.sceneSetting = SceneSetting.DefaultPlayerStart;
            newAction.playerStart  = newPlayerStart;
            return(newAction);
        }
예제 #5
0
        /**
         * <summary>Creates a new instance of the 'Scene: Change setting' Action, set to change the default NavMesh</summary>
         * <param name = "newNavMesh">The new NavMesh</param>
         * <returns>The generated Action</returns>
         */
        public static ActionNavMesh CreateNew_ChangeDefaultNavMesh(NavigationMesh newNavMesh)
        {
            ActionNavMesh newAction = (ActionNavMesh)CreateInstance <ActionNavMesh>();

            newAction.sceneSetting        = SceneSetting.DefaultNavMesh;
            newAction.changeNavMeshMethod = ChangeNavMeshMethod.ChangeNavMesh;
            newAction.newNavMesh          = newNavMesh;
            return(newAction);
        }
예제 #6
0
        /**
         * <summary>Creates a new instance of the 'Scene: Change setting' Action, set to remove a hole from the current NavMesh</summary>
         * <param name = "holeToRemove">The hole to remove</param>
         * <returns>The generated Action</returns>
         */
        public static ActionNavMesh CreateNew_RemoveNavMeshHole(PolygonCollider2D holeToRemove)
        {
            ActionNavMesh newAction = (ActionNavMesh)CreateInstance <ActionNavMesh>();

            newAction.sceneSetting        = SceneSetting.DefaultNavMesh;
            newAction.changeNavMeshMethod = ChangeNavMeshMethod.ChangeNumberOfHoles;
            newAction.holeAction          = InvAction.Remove;
            newAction.hole = holeToRemove;
            return(newAction);
        }