Пример #1
0
            void Helmet()
            {
                if (FlightGlobals.currentMainBody?.atmosphereContainsOxygen != true)
                {
                    return;
                }

                if (helmetTime < (helmetDelay ?? 1))
                {
                    helmetTime += Time.deltaTime;
                }
                else
                {
                    double pressure = FlightGlobals.getStaticPressure();

                    if (helmetHidden != !(pressure < helmetLowPressure || pressure > helmetHighPressure || helmetLowPressure == helmetHighPressure))
                    {
                        if (helmetHidden)
                        {
                            helmetTime = 0;
                        }

                        helmetHidden = eva.CanSafelyRemoveHelmet() && !helmetHidden;

                        eva.ToggleHelmetAndNeckRing(!helmetHidden, !helmetHidden);
                    }
                }
            }
Пример #2
0
        public void OnEnable()
        {
            StartFSM();

            kerbal.ToggleHelmetAndNeckRing(true, true);
            kerbal.headLamp.SetActive(false);
            kerbal.helmetMesh.enabled    = false;
            kerbal.VisorRenderer.enabled = false;
        }