Exemplo n.º 1
0
 /// <summary>
 /// Clean up.
 /// </summary>
 public void Dispose()
 {
     Bonsai.Utils.Settings.SettingsChanged -= new Bonsai.Utils.Settings.SettingsEventHandler(Settings_SettingsChanged);
     if (sound != null)
     {
         sound.Stop();
         sound.Dispose();
         sound = null;
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Clean up.
        /// </summary>
        public void Dispose()
        {
            Bonsai.Utils.Settings.SettingsChanged -= new Bonsai.Utils.Settings.SettingsEventHandler(Settings_SettingsChanged);

            if (iFlightModel != null)
            {
                iFlightModel.Dispose();
                iFlightModel = null;
            }
            if (modelApi != null)
            {
                modelApi.Dispose();
                modelApi = null;
            }
            if (smoke != null)
            {
                smoke.Dispose();
                smoke = null;
            }
            if (airplane != null)
            {
                airplane.Dispose();
                airplane = null;
            }
            if (variometer != null)
            {
                variometer.Dispose();
                variometer = null;
            }
            if (towLine != null)
            {
                towLine.Dispose();
                towLine = null;
            }
            if (windVector != null)
            {
                windVector.Dispose();
                windVector = null;
            }
            if (ripples != null)
            {
                ripples.Dispose();
                ripples = null;
            }
            if (reflection != null)
            {
                reflection.Dispose();
                reflection = null;
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Clean up.
 /// </summary>
 public override void Dispose()
 {
     if (crashSound != null)
     {
         crashSound.Stop();
         crashSound.Dispose();
         crashSound = null;
     }
     if (engineSound != null)
     {
         engineSound.Stop();
         engineSound.Dispose();
         engineSound = null;
     }
     if (rotorSound != null)
     {
         rotorSound.Stop();
         rotorSound.Dispose();
         rotorSound = null;
     }
     if (Mesh != null)
     {
         Mesh.Dispose();
         Mesh = null;
     }
     base.Dispose();
 }
Exemplo n.º 4
0
        /// <summary>
        /// Clean up.
        /// </summary>
        public void Dispose()
        {
            foreach (Gate gate in gates)
            {
                gate.Dispose();
            }
            gates.Clear();

            if (arrow != null)
            {
                arrow.Dispose();
                arrow = null;
            }
            if (passSound != null)
            {
                passSound.Dispose();
                passSound = null;
            }
            owner.CenterHud.ShowGameText("", 0);
        }