// Start is called before the first frame update void Start() { cameraComponent = GetComponent <Camera>(); currentSkyColor = sunnySkyColor; weather.OnGotCloudy += (delayInSeconds) => { StartCoroutine(currentSkyColor.TransitionTo(cloudySkyColor, delayInSeconds)); }; weather.OnGotSunny += (delayInSeconds) => { StartCoroutine(currentSkyColor.TransitionTo(sunnySkyColor, delayInSeconds)); }; }
// Start is called before the first frame update void Start() { lightComponent = GetComponent <Light>(); currentLightColor = sunnyLightColor; weather.OnGotCloudy += (delayInSeconds) => { StartCoroutine(currentLightColor.TransitionTo(cloudyLightColor, delayInSeconds)); }; weather.OnGotSunny += (delayInSeconds) => { StartCoroutine(currentLightColor.TransitionTo(sunnyLightColor, delayInSeconds)); }; }
protected List <BasicObject> UnpackDynamicColors() { List <BasicObject> items = new List <BasicObject>(); UInt32 count = ReadUInt32(); for (int i = 0; i < count; i++) { DynamicColor color = new DynamicColor(); items.Add(color); color.Name = ReadULongPascalString(); for (int c = 0; c < 4; c++) { DynamicColor.ChannelParams chan = color.Channels[c]; chan.MinValue = ReadFloat(); chan.MinValue = ReadFloat(); UInt32 len = ReadUInt32(); for (int s = 0; s < len; s++) { SinusoidParams p = new SinusoidParams(); p.Period = ReadFloat(); p.Offset = ReadFloat(); p.Weight = ReadFloat(); chan.Sinusoids.Add(p); } len = ReadUInt32(); for (int s = 0; s < len; s++) { ClampParams p = new ClampParams(); p.Period = ReadFloat(); p.Offset = ReadFloat(); p.Width = ReadFloat(); chan.ClampUps.Add(p); } len = ReadUInt32(); for (int s = 0; s < len; s++) { ClampParams p = new ClampParams(); p.Period = ReadFloat(); p.Offset = ReadFloat(); p.Width = ReadFloat(); chan.ClampDowns.Add(p); } len = ReadUInt32(); if (len > 0) { chan.Sequence.Period = ReadFloat(); chan.Sequence.Offset = ReadFloat(); for (int s = 0; s < len; s++) { chan.Sequence.Values.Add(ReadByte()); } } } } return(items); }