Ejemplo n.º 1
0
        public void Activate()
        {
            StartResourceConverter();

            if (lightAnim != null && lightAnim.isDeployed == false)
            {
                lightAnim.ToggleAnimation();
            }
        }
Ejemplo n.º 2
0
        public override void ToggleAnimation()
        {
            base.ToggleAnimation();

            //Make sure the lamppost has been deployed.
            if (anim.isDeployed == false)
            {
                anim.ToggleAnimation();
            }
        }
Ejemplo n.º 3
0
        protected void playAnimation()
        {
            if (sequenceIndex == -1)
            {
                return;
            }

            SideElevatorSequences sequence = elevatorSequencer[sequenceIndex];

            switch (sequence)
            {
            case SideElevatorSequences.Deploy:
            case SideElevatorSequences.Stow:
                deployStowAnimation.Toggle();
                break;

            case SideElevatorSequences.Lower:
            case SideElevatorSequences.Raise:
                upDownAnimation.ToggleAnimation();
                break;
            }
        }
Ejemplo n.º 4
0
        public override void ToggleAnimation()
        {
            //If the part has an inflatable part and it's not deployed,
            //then don't allow the lights to come on.
            WBIInflatablePartModule inflatable = this.part.FindModuleImplementing <WBIInflatablePartModule>();

            if (inflatable != null)
            {
                if (inflatable.isDeployed == false && inflatable.isInflatable)
                {
                    ScreenMessages.PostScreenMessage("Cannot turn on the lights until the module is inflated.", 5.0f, ScreenMessageStyle.UPPER_CENTER);
                    return;
                }
            }

            base.ToggleAnimation();
            setupLights();

            if (friendAnimation != null)
            {
                friendAnimation.ToggleAnimation();
            }
        }