예제 #1
0
        /**
         * <summary>Creates a new instance of the 'Engine: Change timescale' Action</summary>
         * <param name = "newTimeScale">The game's new Time.timeScale value</param>
         * <returns>The generated Action</returns>
         */
        public static ActionTimescale CreateNew(float newTimeScale)
        {
            ActionTimescale newAction = (ActionTimescale)CreateInstance <ActionTimescale>();

            newAction.useTimeCurve = false;
            newAction.timeScale    = newTimeScale;
            return(newAction);
        }
예제 #2
0
        /**
         * <summary>Creates a new instance of the 'Engine: Change timescale' Action</summary>
         * <param name = "newTimeCurve">An animation curve that describes the change in Time.timeScale value over time</param>
         * <param name = "waitUntilFinish">If True, the Action will wait until the animation curve has been completely followed</param>
         * <returns>The generated Action</returns>
         */
        public static ActionTimescale CreateNew(AnimationCurve newTimeCurve, bool waitUntilFinish = false)
        {
            ActionTimescale newAction = (ActionTimescale)CreateInstance <ActionTimescale>();

            newAction.useTimeCurve = true;
            newAction.timeCurve    = newTimeCurve;
            newAction.willWait     = waitUntilFinish;
            return(newAction);
        }