コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: KSPWheelAnimation.cs プロジェクト: zxzxn3/KSPWheel
        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);
        }