示例#1
0
        /// <summary>
        /// De register the component with the ocean.
        /// The OceanComponent base class handles the 
        /// general house keeping issues so need to
        /// cast to subclass. 
        /// </summary>
		public void Deregister(OceanComponent component)
		{
			
			if(component is OceanGridBase)
				Grid = null;
			else if(component is WaveSpectrumBase)
				Spectrum = null;
			else if(component is ReflectionBase)
				Reflection = null;
			else if(component is UnderWaterBase)
				UnderWater = null;
			else
				throw new InvalidCastException("Could not cast ocean component " + component.GetType());
			
		}