Exemple #1
0
        }   // end of DoPush()

        public override void Pause()
        {
            // When pausing, stop fan.
            if (Pushing)
            {
                Pushing = false;
                Foley.StopFanLoop(this);
                Foley.PlayFanStop(this);
            }

            base.Pause();
        }   // end of Pause()
Exemple #2
0
        }   // end of PreBrainUpdate()

        public override void PostBrainUpdate()
        {
            // Check if the pushing state has changed and play associated sounds.
            if (!Mute && !WasPushing && Pushing)
            {
                Foley.PlayFanStart(this);
                Foley.PlayFanLoop(this);
            }
            if (wasPushing && !Pushing)
            {
                Foley.StopFanLoop(this);
                if (!Mute)
                {
                    Foley.PlayFanStop(this);
                }
            }

            base.PostBrainUpdate();
        }   // end of PostBrainUpdate()