Exemplo n.º 1
0
        private void Initialize()
        {
            if (initialized)
            {
                return;
            }
            initialized = true;
            ConfigNode    node     = ROLUtils.parseConfigNode(configNodeData);
            AnimationData animData = new AnimationData(node.GetNode("ANIMATIONDATA"));

            animationModule = new ROLAnimationModule(part, this, nameof(persistentState), null, nameof(DeployEngineEvent), nameof(RetractEngineEvent));
            animationModule.getSymmetryModule = m => ((ROLDeployableEngine)m).animationModule;
            animationModule.setupAnimations(animData, part.transform.ROLFindRecursive("model"), 0);
            animationModule.onAnimStateChangeCallback = OnAnimationStateChange;
        }
Exemplo n.º 2
0
 public void reInitialize()
 {
     initialized     = false;
     animationModule = null;
     initialize();
 }