Beispiel #1
0
        /**
         * <summary>Creates a new instance of the 'Object: Change Tint map' Action, set to change the active TintMap</summary>
         * <param name = "followTintMap">The FollowTintMap to update</param>
         * <param name = "newTintMap">The new TintMap to assign to the FollowTintMap</param>
         * <returns>The generated Action</returns>
         */
        public static ActionTintMap CreateNew_ChangeTintMap(FollowTintMap followTintMap, TintMap newTintMap)
        {
            ActionTintMap newAction = (ActionTintMap)CreateInstance <ActionTintMap>();

            newAction.tintMapMethod = TintMapMethod.ChangeTintMap;
            newAction.followTintMap = followTintMap;
            newAction.newTintMap    = newTintMap;
            return(newAction);
        }
Beispiel #2
0
        /**
         * <summary>Creates a new instance of the 'Object: Change Tint map' Action, set to change a FollowTintMap's intensity</summary>
         * <param name = "followTintMap">The FollowTintMap to update</param>
         * <param name = "newIntensity">The FollowTintMap's new target intensity</param>
         * <param name = "transitionTime">The duration, in seconds, of the transition to the new intensity</param>
         * <param name = "waitUntilFinish">If True, then the Action will wait until the transition is complete</param>
         * <returns>The generated Action</returns>
         */
        public static ActionTintMap CreateNew_ChangeIntensity(FollowTintMap followTintMap, float newIntensity, float transitionTime = 0f, bool waitUntilFinish = false)
        {
            ActionTintMap newAction = (ActionTintMap)CreateInstance <ActionTintMap>();

            newAction.tintMapMethod = TintMapMethod.ChangeIntensity;
            newAction.followTintMap = followTintMap;
            newAction.newIntensity  = newIntensity;
            newAction.timeToChange  = transitionTime;
            newAction.isInstant     = (transitionTime <= 0f);
            newAction.willWait      = waitUntilFinish;
            return(newAction);
        }