//! //! switches between play and pause mode of the animation //! receiving function of Play/Pause Button //! public void togglePlayPause() { if (!playing) { editingPosition = false; mainController.hideModifiers(); playing = true; systemTimeOffset = Time.time - currentAnimationTime; } else { playing = false; } }
//! //! switches between play and pause mode of the animation //! receiving function of Play/Pause Button //! public void togglePlayPause() { if (!playing) { editingPosition = false; mainController.hideModifiers(); playing = true; systemTimeOffset = Time.time - currentAnimationTime; // mainController.liveMode = true; } else { // mainController.liveMode = false; playing = false; // stop all layers foreach (AnimationLayer animLayer in animationLayers) { animLayer.isPlaying = false; } } foreach (SceneObject obj in animatedObjects) { obj.isPlayingAnimation = playing; serverAdapter.SendObjectUpdate(obj, ParameterType.HIDDENLOCK); } foreach (AnimationLayer layer in animationLayers) { //animation is playing but not on this layer if (!layer.isPlaying && playing) { foreach (SceneObject obj in layer.layerObjects) { obj.isPlayingAnimation = false; serverAdapter.SendObjectUpdate(obj, ParameterType.HIDDENLOCK); } } else { foreach (SceneObject obj in layer.layerObjects) { obj.isPlayingAnimation = playing; serverAdapter.SendObjectUpdate(obj, ParameterType.HIDDENLOCK); } } } }
//! //! switches between play and pause mode of the animation //! receiving function of Play/Pause Button //! public void togglePlayPause() { if (!playing) { editingPosition = false; mainController.hideModifiers(); playing = true; systemTimeOffset = Time.time - currentAnimationTime; // mainController.liveMode = true; } else { // mainController.liveMode = false; playing = false; // stop all layers foreach (AnimationLayer animLayer in animationLayers) { animLayer.isPlaying = false; } } }