public static AtmosphereParameters Get(AtmosphereBase preset) { switch (preset) { case AtmosphereBase.Default: return(Default); case AtmosphereBase.Earth: return(Earth); case AtmosphereBase.Venus: return(Venus); case AtmosphereBase.Mars: return(Mars); case AtmosphereBase.Jupiter: return(Jupiter); case AtmosphereBase.Titan: return(Titan); case AtmosphereBase.Neptune: return(Neptune); case AtmosphereBase.Sun: return(Sun); case AtmosphereBase.Pluto: return(Pluto); default: { Debug.Log("Atmosphere: AtmosphereParameters.Get(...) fail!"); return(Default); } } }
public static AtmosphereParameters Get(AtmosphereBase preset) { switch (preset) { case AtmosphereBase.Default: return(Default); case AtmosphereBase.Earth: return(Earth); case AtmosphereBase.Venus: return(Venus); case AtmosphereBase.Mars: return(Mars); case AtmosphereBase.Jupiter: return(Jupiter); case AtmosphereBase.Titan: return(Titan); case AtmosphereBase.Neptune: return(Neptune); case AtmosphereBase.Sun: return(Sun); case AtmosphereBase.Pluto: return(Pluto); case AtmosphereBase.Custom: return(Default); default: { Debug.Log(string.Format("AtmosphereParameters: Get({0}) fail!", preset)); return(new AtmosphereParameters(Default)); } } }
private void OnAtmospherePresetChanged(Body body, Atmosphere atmosphere, AtmosphereBase atmosphereBase) { if (body == null) { Debug.Log("Atmosphere: OnAtmospherePresetChanged body is null!"); return; } if (atmosphere == null) { Debug.Log("Atmosphere: OnAtmospherePresetChanged atmosphere is null!"); return; } atmosphere.PushPreset(AtmosphereParameters.Get(atmosphereBase)); atmosphere.Bake(); }