private void initialize() { if (initialized) { return; } initialized = true; ConfigNode node = ROEUtil.parseConfigNode(configNodeData); AnimationData animData = new AnimationData(node.GetNode("ANIMATIONDATA")); animationModule = new AnimationModule(part, this, nameof(persistentState), null, nameof(deployEngineEvent), nameof(retractEngineEvent)); animationModule.getSymmetryModule = m => ((ROEDeployableEngine)m).animationModule; animationModule.setupAnimations(animData, part.transform.FindRecursive("model"), 0); animationModule.onAnimStateChangeCallback = onAnimationStateChange; }
public void reInitialize() { initialized = false; animationModule = null; initialize(); }