private void setupAnimationController() { animationControl = new WheelAnimationHandler(this, animationName, animationSpeed, animationLayer, controller.wheelState, invertAnimation, WrapMode.Once); ConfigNode node = ConfigNode.Parse(configNodeData); if (node != null) { node = node.nodes[0]; if (node != null) { ConfigNode[] animNodes = node.GetNodes("ANIMATION"); animationControl.loadSecondaryAnimations(animNodes); } } animationControl.setToAnimationState(controller.wheelState, false); }
private void setupAnimationController() { animationControl = new WheelAnimationHandler(this, animationName, animationSpeed, animationLayer, controller.wheelState, false, wrap? WrapMode.Loop : WrapMode.PingPong); ConfigNode node = ConfigNode.Parse(configNodeData); if (node != null) { node = node.nodes[0]; if (node != null) { ConfigNode[] animNodes = node.GetNodes("ANIMATION"); animationControl.loadSecondaryAnimations(animNodes); } } animationControl.setToAnimationState(controller.wheelState == KSPWheelState.DEPLOYED?KSPWheelState.DEPLOYED : KSPWheelState.RETRACTED, false); }