/// <summary> /// Initializes a new <see cref="AtmosphereFile"/> from the specified <see cref="Stream"/> /// </summary> /// <param name="stream"><The <see cref="Stream"/> to read from</param> public AtmosphereFile(Stream stream) { using (BinaryReader br = new BinaryReader(stream)) { this.SunColor = new TimeGradient(br); this.SkyColor = new TimeGradient(br); } }
public FXWeaponStreakInfo(BinaryReader br) { this.LinkType = br.ReadInt32(); this.BlendType = br.ReadInt32(); this.TrailsPerSecond = br.ReadSingle(); this.TrailCount = br.ReadSingle(); this.StartAlpha = br.ReadSingle(); this.EndAlpha = br.ReadSingle(); this.AlphaDecay = br.ReadSingle(); this.TextureMapMode = br.ReadInt32(); this.Texture = Encoding.ASCII.GetString(br.ReadBytes(64)); this.Texture = this.Texture.Remove(this.Texture.IndexOf(this.Texture.Contains("\0") ? '\u0000' : '?')); this.ColorOverTime = new TimeGradient(br); this.WidthOverTime = new TimeGradient(br); }
/// <summary> /// Initializes a new <see cref="AtmosphereFile"/> /// </summary> /// <param name="sunColor">The color gradient of the Sun</param> /// <param name="skyColor">The color gradient of the Sky</param> public AtmosphereFile(TimeGradient sunColor, TimeGradient skyColor) { this.SunColor = sunColor; this.SkyColor = skyColor; }