Ejemplo n.º 1
0
        public override void OnStart(StartState state)
        {
            base.OnStart(state);

            //Get the animations
            deployStowAnimation = this.part.FindModuleImplementing <ModuleAnimateGenericSFX>();
            if (deployStowAnimation != null)
            {
                deployStowAnimation.Events["Toggle"].guiActiveEditor    = false;
                deployStowAnimation.Events["Toggle"].guiActive          = false;
                deployStowAnimation.Events["Toggle"].guiActiveUnfocused = false;
            }
            List <WBIAnimation> wbiAnimations = this.part.FindModulesImplementing <WBIAnimation>();

            foreach (WBIAnimation wbiAnim in wbiAnimations)
            {
                if (wbiAnim.animationName == upDownAnimationName)
                {
                    upDownAnimation = wbiAnim;
                    break;
                }
            }
            if (upDownAnimation != null)
            {
                upDownAnimation.showGui(false);
            }
            UpdateGUI();
        }
Ejemplo n.º 2
0
        public override void OnStart(StartState state)
        {
            base.OnStart(state);

            overheatDisplay = this.part.FindModuleImplementing <ModuleOverheatDisplay>();
            lightAnim       = this.part.FindModuleImplementing <WBIAnimation>();
            if (lightAnim != null)
            {
                lightAnim.showGui(false);
            }

            Events["StartResourceConverter"].guiActive       = false;
            Events["StartResourceConverter"].guiActiveEditor = false;
            Events["StopResourceConverter"].guiActive        = false;
            Events["StopResourceConverter"].guiActiveEditor  = false;
            Actions["StopResourceConverterAction"].active    = false;
            Actions["StartResourceConverterAction"].active   = false;

            if (reactorIsOn)
            {
                this.Activate();
                Events["ToggleReactor"].guiName = "Reactor Off";
            }
            else
            {
                Events["ToggleReactor"].guiName = "Reactor On";
            }
        }