diff --git a/src/motion/Actuate.hx b/src/motion/Actuate.hx index 79c7587..a1ce572 100644 --- a/src/motion/Actuate.hx +++ b/src/motion/Actuate.hx @@ -20,7 +20,10 @@ import flash.display.DisplayObject; class Actuate { - + /** + * global speed control (for bullet time effect, fast forward effect) + */ + public static var speedGlobal:Float = 1; public static var defaultActuator:Class = SimpleActuator; public static var defaultEase:IEasing = Expo.easeOut; private static var targetLibraries = new ObjectMap> (); diff --git a/src/motion/actuators/GenericActuator.hx b/src/motion/actuators/GenericActuator.hx index 1ca928e..7a81d62 100644 --- a/src/motion/actuators/GenericActuator.hx +++ b/src/motion/actuators/GenericActuator.hx @@ -9,8 +9,9 @@ import motion.Actuate; class GenericActuator implements IGenericActuator { - - private var duration:Float; + public var duration(get, set):Float; + + private var _duration:Float; private var id:String; private var properties:Dynamic; private var target:T; @@ -453,5 +454,11 @@ class GenericActuator implements IGenericActuator { } - + public inline function get_duration ():Float { + return _duration / Actuate.speedGlobal; + } + + public inline function set_duration (value:Float):Float { + return _duration = value; + } } \ No newline at end of file